X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=CMakeLists.txt;h=c88ac3b277ed90f17c811c70c546339e51dc2b4f;hb=53b41d0284112542699289680f01c944bbb04567;hp=3ee613db64b304a1e6f4010380cff72f2d390f8b;hpb=f36c81c8cbf77d97f3b14b17c7e061e4dda6f666;p=flightgear.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ee613db6..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) -# 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() + +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) @@ -168,6 +177,7 @@ option(SYSTEM_SPEEX "Set to ON to build IAXClient with the system's speex a option(SYSTEM_GSM "Set to ON to build IAXClient with the system's GSM library" ${SYSTEM_GSM_DEFAULT}) option(SYSTEM_FLITE "Set to ON to build Flightgear with the system's Flite library" ${SYSTEM_FLITE_DEFAULT}) option(SYSTEM_HTS_ENGINE "Set to ON to build Flightgear with the system's HTS Engine library" ${SYSTEM_HTS_ENGINE_DEFAULT}) +option(FG_NIGHTLY "Set to ON to mark this as a nightly build" OFF) # additional utilities option(ENABLE_FGADMIN "Set to ON to build the FGADMIN application (default)" ON) @@ -230,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 @@ -287,9 +296,6 @@ if (USE_DBUS) else() endif (USE_DBUS) -# Sqlite always depends on the threading lib -list(APPEND SQLITE3_LIBRARY ${CMAKE_THREAD_LIBS_INIT}) - ############################################################################## ## Qt5 setup setup if (ENABLE_QT) @@ -297,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)