]> git.mxchange.org Git - simgear.git/commitdiff
Switch 10.7 on Mac and revert to using libc++
authorJames Turner <zakalawe@mac.com>
Mon, 9 Feb 2015 15:12:21 +0000 (15:12 +0000)
committerJames Turner <zakalawe@mac.com>
Mon, 9 Feb 2015 15:12:21 +0000 (15:12 +0000)
(Deployment on libstdc++ with the 10.9 SDK is just too painful)

CMakeLists.txt

index 2c97bcb1418f00e38f73d66eadbf6a256ac72bd7..c78c30b2c279c706f33fed704919feeea358f551 100644 (file)
@@ -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...