]> git.mxchange.org Git - flightgear.git/blobdiff - CMakeLists.txt
hla: add io chanel configuration shortcut hla-local.
[flightgear.git] / CMakeLists.txt
index 5f014f230c20d0fb66d84141f6a422b0f4d18db2..c472aff6f15dc79ef2cb54fd049d1b8f5a9c62d0 100644 (file)
@@ -95,6 +95,7 @@ else()
 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(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)
@@ -104,7 +105,9 @@ 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_LIBSVN     "Set to ON to build FlightGear/terrasync with libsvnclient support (default)" ON)
 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)
 
 # additional utilities
 option(ENABLE_FGADMIN    "Set to ON to build the FGADMIN application (default)" ON)
@@ -131,6 +134,7 @@ if(EVENT_INPUT)
             message(WARNING "UDev not found, event input is disabled!")
             set(EVENT_INPUT 0)
         else()
+            add_definitions(-DWITH_EVENTINPUT)
             set(EVENT_INPUT_LIBRARIES ${UDEV_LIBRARIES})
             message(STATUS "event-based input enabled. Using ${UDEV_LIBRARIES}")
         endif()
@@ -182,6 +186,15 @@ if(ENABLE_LIBSVN)
     endif(LIBSVN_FOUND)
 endif(ENABLE_LIBSVN)
 
+if (SYSTEM_SQLITE)
+    find_package(SQLite3 REQUIRED)
+    set(CMAKE_REQUIRED_INCLUDES ${SQLITE3_INCLUDED_DIR})
+    message(STATUS "Using system SQLite3 library")
+endif (SYSTEM_SQLITE)
+
+# Sqlite always depends on the threading lib
+list(APPEND SQLITE3_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
+
 find_package(PLIB REQUIRED puaux pu js fnt)
 
 # FlightGear and SimGear versions need to match
@@ -211,6 +224,12 @@ 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)
 
+if(ENABLE_PROFILE)
+    find_package(GooglePerfTools REQUIRED)
+    set(FG_HAVE_GPERFTOOLS 1)
+    message(STATUS "Built-in profiler using gperftools available")
+endif()
+
 if(ENABLE_RTI)
     find_package(RTI)
     if(RTI_FOUND)