From 6ffc50156605af5b44d686b4429b9ba86b8f1747 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 1 Oct 2018 22:28:56 +0100 Subject: [PATCH] Mac: Set CMake OS-X deployment target correctly Also raises the OS-X min version to 10.9 for libc++ compat --- CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e4116a0..3562e791 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ include (GenerateExportHeader) # only relevant for building shared libs but let's set it regardless set(CMAKE_OSX_RPATH 1) +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version") # let's use & require C++11 - note these are only functional with CMake 3.1 # we do manual fallbacks for CMake 3.0 in the compilers section @@ -44,12 +45,7 @@ string(STRIP ${versionFile} SIMGEAR_VERSION) project(SimGear VERSION ${SIMGEAR_VERSION} LANGUAGES C CXX) -# using 10.7 because boost requires libc++ and 10.6 doesn't include it -# Cmake documentation says we must set this before calling project(), but -# it only seems to be picked up setting it /after/ the call to project() -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") - -# add a dependency on the versino file +# add a dependency on the version file set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS version) set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)