CMake main project fixes