[cmake-developers] CMake 3.5.2 conflates OSX SDK version with target deployment

James Burgess jamesrburgess at mac.com
Sun May 22 01:50:41 EDT 2016


If your set CMAKE_OSX_DEPLOYMENT_TARGET in order to get find modules to work on Xcode6 or above you get this message:

$ cmake -D CMAKE_OSX_DEPLOYMENT_TARGET=10.8 .
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' but the matching SDK does not exist
  at:

   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"

  Instead using SDK:

   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk".
Call Stack (most recent call first):
  /Applications/CMake.app/Contents/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake:18 (include)
  CMakeLists.txt:25 (project)


CMake is setting the value of --mmacosx-version-min= to this value. Which SDK you have does not need to be the same as the target deployment (which can be less than the SDK). That is to say the 10.10sdk can target 10.8, meaning code compiled with 10.8 set as the target will run on 10.8, 10.9 and 10.10 machines.

- James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160521/8038242a/attachment.html>


More information about the cmake-developers mailing list