Can CMake specify the base SDK on Mac OS X?

后端 未结 3 752
我寻月下人不归
我寻月下人不归 2020-12-30 06:06

Does anyone know how to do specify the Mac OS X SDK to build against with CMake? I have searched for cmake mac "base sdk" but this turned up nothing.<

3条回答
  •  余生分开走
    2020-12-30 06:40

    You can set the variable CMAKE_OSX_SYSROOT to the chosen SDK upon configuring the project. E.g.:

    cmake -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk/ ..
    

    See the documentation here.

    Also note that CMake versions before 2.8.8 do not support Xcode 4.3.

提交回复
热议问题