|
|
@@ -96,14 +96,18 @@ elseif (TVOS)
|
|
|
unset (CMAKE_OSX_DEPLOYMENT_TARGET CACHE)
|
|
|
elseif (XCODE)
|
|
|
set (CMAKE_OSX_SYSROOT macosx) # Set Base SDK to "Latest OS X"
|
|
|
- if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
|
|
+ if (CMAKE_OSX_DEPLOYMENT_TARGET)
|
|
|
+ if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9)
|
|
|
+ message (FATAL_ERROR "The minimum supported CMAKE_OSX_DEPLOYMENT_TARGET is 10.9.")
|
|
|
+ endif ()
|
|
|
+ else ()
|
|
|
# If not set, set to current running build system OS version by default
|
|
|
execute_process (COMMAND sw_vers -productVersion OUTPUT_VARIABLE CURRENT_OSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
string (REGEX REPLACE ^\([^.]+\\.[^.]+\).* \\1 CMAKE_OSX_DEPLOYMENT_TARGET ${CURRENT_OSX_VERSION})
|
|
|
- set (CMAKE_OSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET} CACHE STRING "Specify macOS deployment target (macOS platform only); default to current running macOS if not specified, the minimum supported target is 10.5 due to constraint from SDL library")
|
|
|
+ set (CMAKE_OSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET} CACHE STRING "Specify macOS deployment target (macOS platform only); default to current running macOS if not specified, the minimum supported target is 10.9")
|
|
|
endif ()
|
|
|
if (DEPLOYMENT_TARGET_SAVED AND NOT CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL DEPLOYMENT_TARGET_SAVED)
|
|
|
- set (CMAKE_OSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET_SAVED} CACHE STRING "Specify macOS deployment target (macOS platform only); default to current running macOS if not specified, the minimum supported target is 10.5 due to constraint from SDL library" FORCE)
|
|
|
+ set (CMAKE_OSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET_SAVED} CACHE STRING "Specify macOS deployment target (macOS platform only); default to current running macOS if not specified, the minimum supported target is 10.9" FORCE)
|
|
|
message (FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET cannot be changed after the initial configuration/generation. "
|
|
|
"Auto reverting to its initial value. If you wish to change it then the build tree would have to be regenerated from scratch.")
|
|
|
endif ()
|