mirror of https://github.com/vitalif/openscad
#559 CMAKE_OSX_DEPLOYMENT_TARGET needs to be cached
parent
941b56e7f8
commit
b131464f95
|
@ -14,14 +14,14 @@ include(CMakeParseArguments.cmake)
|
|||
|
||||
# Detect Lion and force gcc
|
||||
IF (APPLE)
|
||||
# Somehow, since we build dependencies for 10.7, we need to also build executables
|
||||
# for 10.7. This used to not be necessary, but since 10.9 it apparently is..
|
||||
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
|
||||
EXECUTE_PROCESS(COMMAND sw_vers -productVersion OUTPUT_VARIABLE MACOSX_VERSION)
|
||||
IF (NOT ${MACOSX_VERSION} VERSION_LESS "10.9.0")
|
||||
message("Detected Maverick (10.9) or later")
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
set(CMAKE_CXX_COMPILER "clang++")
|
||||
# Somehow, since we build dependencies for 10.7, we need to also build executables
|
||||
# for 10.7. This used to not be necessary, but since 10.9 it apparently is..
|
||||
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.7 CACHE STRING "Deployment target")
|
||||
ELSEIF (NOT ${MACOSX_VERSION} VERSION_LESS "10.8.0")
|
||||
message("Detected Mountain Lion (10.8)")
|
||||
set(CMAKE_C_COMPILER "clang")
|
||||
|
|
Loading…
Reference in New Issue