OSX/cmake: use again 10.5 as general deployment target ( pls verify 10.5 compatibility works with automatic weaklinking), use now then sdk which for sure exists, remove obsolete slash
This commit is contained in:
@@ -262,10 +262,8 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
message(STATUS "Detected system-version: " ${OSX_SYSTEM})
|
message(STATUS "Detected system-version: " ${OSX_SYSTEM})
|
||||||
|
|
||||||
if(${OSX_SYSTEM} GREATER 10.6)
|
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6" CACHE STRING "" FORCE) # 10.7 does not have 10.5sdk !!!
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "" FORCE) # 10.5 is our minimum target, if you have higher sdk, weak linking happens
|
||||||
else()
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "" FORCE) # 10.5 is our minimum target
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||||
@@ -1097,12 +1095,12 @@ elseif(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${XCODE_VERSION} LESS 4.3)
|
if(${XCODE_VERSION} LESS 4.3)
|
||||||
SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${CMAKE_OSX_DEPLOYMENT_TARGET}.sdk CACHE PATH "" FORCE )
|
SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE ) # use guaranteed existing sdk
|
||||||
else()
|
else()
|
||||||
# note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
|
# note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
|
||||||
# absolute pathes are more foolproof here !
|
# absolute pathes are more foolproof here !
|
||||||
SET(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
|
SET(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
|
||||||
SET(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${CMAKE_OSX_DEPLOYMENT_TARGET}.sdk)
|
SET(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
|
||||||
SET(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
|
SET(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user