Thanks,

This works sorta. The problem is that when adding the CMakeList.txt files, these are inserted into the compile sources phase. Thus, one get a lot of warnings about Xcode not being able to build the CMakeList.txt file, the same happens for other files not recognised by Xcode. Xcode does for example recognise lex-files, though these should be built with the standard add_custom_target build rules anyway, and not with Xcode's lex-invoker as the command-line parameters specified for flex program in the CMakeLists.txt files will be missed.

If anyone know how one add a file to a project without making it be part of the build, I would be in debt.


Mattias

On Nov 27, 2006, at 11:02 AM, Sylvain Benner wrote:


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

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to