]> git.mxchange.org Git - flightgear.git/blobdiff - CMakeLists.txt
Nasal: use SG_LOG for security error messages to avoid truncation
[flightgear.git] / CMakeLists.txt
index 2a7d04fb4a78395c1dc318f8f5057e298d9ff014..4808f9d7fccece0757ed5efee4f752c16d505da0 100644 (file)
@@ -14,10 +14,18 @@ if(COMMAND cmake_policy)
    endif()
 endif()
 
-project(FlightGear)
+if(APPLE)
+       # 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)
+
+       set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
+       # when building, don't use the install RPATH already
+       # (but later on when installing)
+       SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+endif()
 
-# using 10.7 because boost requires libc++ and 10.6 doesn't include it
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7")
+project(FlightGear)
 
 # We have some custom .cmake scripts not in the official distribution.
 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
@@ -107,9 +115,11 @@ IF(APPLE)
     find_library(CORESERVICES_LIBRARY CoreServices)
     find_library(COCOA_LIBRARY Cocoa)
     list(APPEND PLATFORM_LIBS ${COCOA_LIBRARY} ${CORESERVICES_LIBRARY})
-
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+    find_package(Threads REQUIRED)
+    find_package(X11 REQUIRED)
+
     set(USE_DBUS_DEFAULT 1)
 
     find_package(UDev)
@@ -231,7 +241,6 @@ endif(EVENT_INPUT)
 # check required dependencies
 find_package(Boost   REQUIRED)
 find_package(ZLIB    REQUIRED)
-find_package(Threads REQUIRED)
 find_package(OpenGL  REQUIRED)
 find_package(OpenAL  REQUIRED)
 find_package(OpenSceneGraph 3.2.0 REQUIRED