[CMake] Linking against OS X Frameworks
ML
mailinglists at MailNewsRSS.com
Sun Aug 9 12:59:33 EDT 2009
Michael,
Thank you for this example! It was really informative. Definitely a
missing piece in my knowledge thus far.
One question:
I get an error stating:
CMake Error at CMakeLists.txt:70 (message):
MoreFilesX requires the SDK version to be not newer than 10.4u (10.6
detected)
this comes from here:
> # figure out Mac OSX SDK version (do not care for the u-suffix in
> 10.4u)
> get_filename_component( SDK_VER ${CMAKE_OSX_SYSROOT} NAME )
> string( REPLACE ".sdk" "" SDK_VER ${SDK_VER} )
> string( REPLACE "MacOSX" "" SDK_VER ${SDK_VER} )
> string( REGEX REPLACE "[a-zA-Z]" "" SDK_VER ${SDK_VER} )
> # this REALLY needs the 10.4 SDK.
> if( ${SDK_VER} VERSION_GREATER 10.4 )
> message( SEND_ERROR "MoreFilesX requires the SDK version to be not
> newer than 10.4u (${SDK_VER} detected)" )
> endif( ${SDK_VER} VERSION_GREATER 10.4 )
So how do I turn around and set 10.4u if it is not automatically
detected?
It is like this:
CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk
Best,
-Jason
More information about the CMake
mailing list