updated for cmake.