X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=CMakeLists.txt;h=c88ac3b277ed90f17c811c70c546339e51dc2b4f;hb=53b41d0284112542699289680f01c944bbb04567;hp=ccd58ea5549482b557e1032f5fb4340c7d93a062;hpb=a466dbce7386afbf0c1b1103a8c457d8395a10c3;p=flightgear.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ccd58ea55..c88ac3b27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.6.4) +cmake_minimum_required (VERSION 2.8.11) include (CheckFunctionExists) include (CheckCSourceCompiles) @@ -14,10 +14,17 @@ 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_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_OSX_DEPLOYMENT_TARGET 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 +114,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 +240,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 +303,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)