]> git.mxchange.org Git - flightgear.git/blobdiff - CMakeLists.txt
Reset: work with threaded OSG modes
[flightgear.git] / CMakeLists.txt
index de01dfc140246c4455a59c78ee63b89ab48cbdf9..35e12ac1cdcf97c99552b830545d0e55d1bbeff8 100644 (file)
@@ -73,12 +73,6 @@ endif()
 # Configure library search paths
 #####################################################################################
 
-if(APPLE)
-    # Custom library directories for Mac, which should have precedence over any other
-    list(APPEND ADDITIONAL_LIBRARY_PATHS
-         ~/Library/Frameworks
-         /Library/Frameworks)
-endif(APPLE)
 
 if(NOT "${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "")
     # Workaround for Ubuntu/Debian which introduced the "multiarch" library
@@ -93,13 +87,6 @@ if(NOT "${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "")
     message(STATUS "additional library directories: ${ADDITIONAL_LIBRARY_PATHS}")
 endif()
 
-if(NOT MSVC)
-    # TBD: are these really necessary? Aren't they considered by cmake automatically?
-    list(APPEND ADDITIONAL_LIBRARY_PATHS
-         /opt/local
-         /usr/local
-         /usr)
-endif()
 #####################################################################################
 
 IF(APPLE)
@@ -142,6 +129,7 @@ endif()
 # FlightGear build options
 option(SIMGEAR_SHARED    "Set to ON when SimGear was built as a shared library" OFF)
 option(LOGGING           "Set to ON to build FlightGear with logging support (default)" ON)
+option(JSBSIM_TERRAIN    "Set to ON to build FlightGear with JSBSim terrain handling code" ON)
 option(SP_FDMS           "Set to ON to build FlightGear with special-purpose FDMs" OFF)
 option(ENABLE_UIUC_MODEL "Set to ON to build FlightGear with UIUCModel FDM" OFF)
 option(ENABLE_LARCSIM    "Set to ON to build FlightGear with LaRCsim FDM" OFF)
@@ -150,7 +138,6 @@ option(ENABLE_JSBSIM     "Set to ON to build FlightGear with JSBSim FDM (default
 option(EVENT_INPUT       "Set to ON to build FlightGear with event-based Input support" ${EVENT_INPUT_DEFAULT})
 option(ENABLE_RTI        "Set to ON to build FlightGear with RTI support" OFF)
 option(ENABLE_PROFILE    "Set to ON to build FlightGear with gperftools profiling support" OFF)
-option(JPEG_FACTORY      "Set to ON to build FlightGear with JPEG-factory support" OFF)
 option(SYSTEM_SQLITE     "Set to ON to build FlightGear with the system's SQLite3 library" OFF)
 option(ENABLE_IAX        "Set to ON to build FlightGear with IAXClient/fgcom built-in (default)" ON)
 option(USE_DBUS          "Set to ON to build FlightGear with DBus screensaver interaction (default on Linux)" ${USE_DBUS_DEFAULT})
@@ -169,6 +156,7 @@ option(ENABLE_JS_DEMO    "Set to ON to build the js_demo application (default)"
 option(ENABLE_METAR      "Set to ON to build the metar application (default)" ON)
 option(ENABLE_TESTS      "Set to ON to build test applications (default)" ON)
 option(ENABLE_FGCOM      "Set to ON to build the FGCom application (default)" ON)
+option(ENABLE_FLITE      "Set to ON to build the Flite text-to-speech module" OFF)
 
 if(LOGGING)
     # nothing
@@ -176,6 +164,10 @@ else()
     set(FG_NDEBUG 1)
 endif()
 
+if(JSBSIM_TERRAIN)
+   set(JSBSIM_USE_GROUNDREACTIONS 1)
+endif()
+
 if(SP_FDMS)
     set(ENABLE_SP_FDM 1)
 endif()
@@ -214,7 +206,7 @@ find_package(ZLIB    REQUIRED)
 find_package(Threads REQUIRED)
 find_package(OpenGL  REQUIRED)
 find_package(OpenAL  REQUIRED)
-find_package(OpenSceneGraph 3.0.0 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA)
+find_package(OpenSceneGraph 3.2.0 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA)
 
 if (MSVC)
        find_package(CrashRpt)
@@ -293,26 +285,6 @@ find_package(SimGear ${FLIGHTGEAR_VERSION} REQUIRED)
 
 ##############################################################################
 
-if (JPEG_FACTORY)
-    # check simgear was built with JPEG-factory support
-    find_package(JPEG REQUIRED)
-    include_directories(${JPEG_INCLUDE_DIR})
-
-    set(CMAKE_REQUIRED_INCLUDES
-        ${SIMGEAR_INCLUDE_DIR}
-        ${JPEG_INCLUDE_DIR}
-        ${OPENSCENEGRAPH_INCLUDE_DIRS})
-
-    check_cxx_source_compiles(
-        "#include <simgear/screen/jpgfactory.hxx>
-        int main()    { return 0; } "
-        FG_JPEG_SERVER)
-
-    if (NOT FG_JPEG_SERVER)
-        message(STATUS "JPEG server support requested, but SimGear was built without JPEG support")
-    endif()
-endif()
-
 check_include_file(unistd.h   HAVE_UNISTD_H)
 check_include_file(sys/time.h HAVE_SYS_TIME_H)
 check_include_file(windows.h  HAVE_WINDOWS_H)
@@ -383,6 +355,11 @@ include_directories(${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib ) # for iaxclie
 include_directories(${PROJECT_BINARY_DIR}/src)
 include_directories(${PROJECT_BINARY_DIR}/src/Include)
 
+if (ENABLE_FLITE)
+    include_directories(${PROJECT_SOURCE_DIR}/3rdparty/hts_engine_API/include )
+    include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/include )
+endif()
+
 add_definitions(-DHAVE_CONFIG_H)
 
 check_function_exists(mkfifo HAVE_MKFIFO)