]> git.mxchange.org Git - simgear.git/blobdiff - CMakeLists.txt
Off-by-one error in the OSG_VERSION_LESS_THAN macro
[simgear.git] / CMakeLists.txt
index de92fcfbfd8a36f180db19d0e1f5851bbbbfb389..c0732be0d761fb9b953af64ec2632fbc5333aaa9 100644 (file)
@@ -11,12 +11,13 @@ endif()
 
 include (CheckFunctionExists)
 include (CheckIncludeFile)
+include (CheckLibraryExists)
 include (CheckCXXSourceCompiles)
 include (CheckCXXCompilerFlag)
 
-# set this before project()
 # using 10.7 because boost requires libc++ and 10.6 doesn't include it
 set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
+set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
 
 project(SimGear)
 
@@ -177,6 +178,11 @@ if(APPLE)
   find_library(COCOA_LIBRARY Cocoa)
 endif()
 
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
+       ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+    find_package(Threads REQUIRED)
+endif()
+
 # Somehow this only works if included before searching for Boost...
 include(BoostTestTargets)
 
@@ -199,7 +205,6 @@ else()
 endif(SIMGEAR_HEADLESS)
 
 find_package(ZLIB REQUIRED)
-find_package(Threads REQUIRED)
 
 if (SYSTEM_EXPAT)
     message(STATUS "Requested to use system Expat library, forcing SIMGEAR_SHARED to true")