From: James Turner Date: Mon, 9 Feb 2015 15:12:21 +0000 (+0000) Subject: Switch 10.7 on Mac and revert to using libc++ X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7479cadbba8a12c7bba8fe890fa6800fd60afd31;p=simgear.git Switch 10.7 on Mac and revert to using libc++ (Deployment on libstdc++ with the 10.9 SDK is just too painful) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c97bcb1..c78c30b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,18 @@ cmake_minimum_required (VERSION 2.6.4) + +if(COMMAND cmake_policy) + cmake_policy(SET CMP0054 NEW) + cmake_policy(SET CMP0042 NEW) +endif() + include (CheckFunctionExists) include (CheckIncludeFile) include (CheckCXXSourceCompiles) include (CheckCXXCompilerFlag) # set this before project() -set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) +# using 10.7 because boost requires libc++ and 10.6 doesn't include it +set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7) project(SimGear) @@ -164,12 +171,6 @@ endif (MSVC AND MSVC_3RDPARTY_ROOT) if(APPLE) find_library(COCOA_LIBRARY Cocoa) - - # force libstdc++, not libc++ - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++") - list(APPEND CMAKE_CXX_FLAGS "-stdlib=libstdc++") - list(APPEND CMAKE_EXE_LINKER_FLAGS "-stdlib=libstdc++") - list(APPEND CMAKE_SHARED_LINKER_FLAGS "-stdlib=libstdc++") endif() # Somehow this only works if included before searching for Boost...