Skip to content

Commit 90c3713

Browse files
authored
Merge pull request #1336 from gangliao/macosx
set macosx deployment version
2 parents 6b058ea + 0986415 commit 90c3713

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/system.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ ELSE(WIN32)
2828
STRING(REGEX MATCH "[0-9]+.[0-9]+" VERSION "${MACOSX_VERSION}")
2929
SET(MACOS_VERSION ${VERSION})
3030
SET(HOST_SYSTEM "macosx")
31+
IF(NOT DEFINED ENV{MACOSX_DEPLOYMENT_TARGET})
32+
# Set cache variable - end user may change this during ccmake or cmake-gui configure.
33+
SET(CMAKE_OSX_DEPLOYMENT_TARGET ${MACOS_VERSION} CACHE STRING
34+
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.")
35+
ENDIF()
3136
ELSE(APPLE)
3237

3338
IF(EXISTS "/etc/issue")

0 commit comments

Comments
 (0)