]> git.mxchange.org Git - simgear.git/commitdiff
Only detect threading library where needed
authorJames Turner <zakalawe@mac.com>
Tue, 17 Mar 2015 23:28:52 +0000 (23:28 +0000)
committerJames Turner <zakalawe@mac.com>
Tue, 17 Mar 2015 23:28:52 +0000 (23:28 +0000)
- avoids failure with newest CMake on Mac

CMakeLists.txt

index f11c07afc3b3a20f59afa4a643a3899741e907f6..5b24598a58a604755bdde5db7a5d4adb7c9b532e 100644 (file)
@@ -176,6 +176,11 @@ if(APPLE)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7")
 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)
 
@@ -198,7 +203,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")