CMake, Xcode and Unix Makefile

后端 未结 2 843
囚心锁ツ
囚心锁ツ 2020-12-29 21:57

I was using classic Unix Makefile generator until I found a webpage explaining CMake could produce a nice xcode project file using \"cmake -G Xcode\" so I ran that command i

相关标签:
2条回答
  • 2020-12-29 22:47

    You can use xcodebuild to still have a proper Xcode project and build it from the command line/shell script/Makefile, e.g.

    xcodebuild -project MyProject.xcodeproj -target MyTarget -configuration Release
    
    0 讨论(0)
  • 2020-12-29 22:50

    I found the answer by myself (I mean asking the good person) :

    Use 2 separate build directories for each type of build files. This will ensure each build directory has the correct build files and generated files for its use.

    In the add_executable() command, in addition to the source files also include the headers and generated headers for those to show up in Xcode.

    0 讨论(0)
提交回复
热议问题