[CMake] xcode projects missing files

Sylvain Benner benner at virtools.com
Mon Nov 27 05:02:48 EST 2006


> I am trying to generate an Xcode project with CMake. However, there 
> seem to be a couple of issues with this. Firstly, the CMakeLists.txt 
> files arn't added to the project, so updating the project files is 
> kind of a pain.
>
Hello,

You can add this file manually with something like this:

IF(CMAKE_GENERATOR MATCHES "Xcode")
    SOURCE_GROUP("CMake" FILES "CMakeLists.txt")
    LIST(APPEND TARGET_FILES "CMakeLists.txt")
ENDIF(CMAKE_GENERATOR MATCHES "Xcode")

ADD_EXECUTABLE(${PROJECT_NAME}  ${TARGET_FILES})

Sylvain


More information about the CMake mailing list