I am trying to use CMake Generated Xcode project. Everything looks good when building, except that Xcode can not find the binaries that are built. Below is a screenshot i took after successfully build the product. I can see them in the project source directory. However, notice that the Xcode showing RED "HelloWorld", which means it can not find the products.
Configurations: CMake 2.8.6 with Xcode 4.2 on Lion 10.7.2
This is CMakeLists.txt
project(HelloWorld)
add_executable(${PROJECT_NAME} HelloWorld.cpp)
This is the source code for HelloWorld.cpp
#include <iostream>
int main(){
std::cout << "HelloWorld!" << std::endl;
return 0;
}
I tried to create a raw project directly from Xcode, after compiles, the products shows black instead of red font, which means Xcode found the products. So i am sure this is related to CMake Generated Xcode project.
Anyone got any idea? how to fix this?
The xcode project file (which I guess, in your case would be named something like HelloWorld.xcproject/project.pbxproject
, will have SYMROOT definitions for each of the build configurations per target.
You can either change all the SYMROOT definitions to the same value or remove all of those (xcode will default to "build").
Project, if open, should autoreload. Select ALL_BUILD or HelloWord, clean and build.
Not sure if it is an issue with the way cmake adds the SYMROOT.
Note: I know this only hints at what the problem could be and not a solution but am not allowed to add comments yet :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With