]> git.mxchange.org Git - flightgear.git/blobdiff - CMakeLists.txt
Portability: Fix compile errors on MSVC (cmath)
[flightgear.git] / CMakeLists.txt
index ccd58ea5549482b557e1032f5fb4340c7d93a062..c881c32205e0e35b37ada786eac1af5a1cce212a 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.6.4)
+cmake_minimum_required (VERSION 2.8.11)
 
 include (CheckFunctionExists)
 include (CheckCSourceCompiles)
@@ -16,9 +16,6 @@ endif()
 
 project(FlightGear)
 
-# using 10.7 because boost requires libc++ and 10.6 doesn't include it
-set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
-
 # We have some custom .cmake scripts not in the official distribution.
 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
 
@@ -108,8 +105,12 @@ IF(APPLE)
     find_library(COCOA_LIBRARY Cocoa)
     list(APPEND PLATFORM_LIBS ${COCOA_LIBRARY} ${CORESERVICES_LIBRARY})
 
+    # 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")
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+    find_package(Threads REQUIRED)
+    
     set(USE_DBUS_DEFAULT 1)
 
     find_package(UDev)
@@ -231,7 +232,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
@@ -295,6 +295,8 @@ if (ENABLE_QT)
        find_package(Qt5 5.1 COMPONENTS Widgets)
        if (Qt5Widgets_FOUND)
                message(STATUS "Will enable Qt launcher GUI")
+               message(STATUS "  Qt5Widgets version: ${Qt5Widgets_VERSION_STRING}")
+               message(STATUS "  Qt5Widgets include dir: ${Qt5Widgets_INCLUDE_DIRS}")
                set(HAVE_QT 1)
        endif()
 endif (ENABLE_QT)