]> git.mxchange.org Git - flightgear.git/blobdiff - CMakeLists.txt
Remove some debugging statements
[flightgear.git] / CMakeLists.txt
index 816fa80d9d2c98f1b1046852bd963873bbcab958..673976b5d76754465bf17ecb8dbe61c5ead51f12 100644 (file)
@@ -54,6 +54,8 @@ if (NOT versionFile)
     message(FATAL_ERROR "Unable to determine FlightGear version. Version file is missing.")
 endif()
 string(STRIP "${versionFile}" FLIGHTGEAR_VERSION)
+# add a dependency on the versino file
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS version)
 
 # FlightGear packaging (to build a source tarball)
 include( ConfigureCPack )
@@ -108,6 +110,12 @@ IF(APPLE)
     find_library(CORESERVICES_LIBRARY CoreServices)
     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")
+    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
+elseif(WIN32)
+    list(APPEND PLATFORM_LIBS "Shlwapi.lib")
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
        ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
     find_package(Threads REQUIRED)
@@ -156,9 +164,9 @@ endif()
 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)
+option(SP_FDMS           "Set to ON to build FlightGear with special-purpose FDMs" ON)
+option(ENABLE_UIUC_MODEL "Set to ON to build FlightGear with UIUCModel FDM" ON)
+option(ENABLE_LARCSIM    "Set to ON to build FlightGear with LaRCsim FDM" ON)
 option(ENABLE_YASIM      "Set to ON to build FlightGear with YASIM FDM (default)" ON)
 option(ENABLE_JSBSIM     "Set to ON to build FlightGear with JSBSim FDM (default)" ON)
 option(EVENT_INPUT       "Set to ON to build FlightGear with event-based Input support" ${EVENT_INPUT_DEFAULT})
@@ -167,6 +175,7 @@ option(ENABLE_PROFILE    "Set to ON to build FlightGear with gperftools profilin
 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})
+option(USE_AEONWAVE      "Set to ON to use AeonWave instead of OpenAL" OFF)
 option(SYSTEM_SPEEX      "Set to ON to build IAXClient with the system's speex and speexdsp library" ${SYSTEM_SPEEX_DEFAULT})
 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})
@@ -175,7 +184,6 @@ option(FG_NIGHTLY        "Set to ON to mark this as a nightly build" OFF)
 option(ENABLE_DEV_WARNINGS "Set to ON to include developer-warnings" OFF)
 
 # additional utilities
-option(ENABLE_FGADMIN    "Set to ON to build the FGADMIN application (default)" ON)
 option(ENABLE_FGELEV     "Set to ON to build the fgelev application (default)" ON)
 option(WITH_FGPANEL      "Set to ON to build the fgpanel application (default)" ON)
 option(ENABLE_FGVIEWER   "Set to ON to build the fgviewer application (default)" ON)
@@ -352,15 +360,15 @@ endif()
 if(WIN32)
 
     if(MSVC)
-        # turn off various warnings
-        # foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
-        #     SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
-        # endforeach(warning)
-
-        set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS -Dstrdup=_strdup")
+        set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /MP")
         if (${MSVC_VERSION} GREATER 1599)
             set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" )
         endif (${MSVC_VERSION} GREATER 1599)
+
+        if (${MSVC_VERSION} GREATER 1899)
+            # needed for debug builds with VS2015
+            set( MSVC_FLAGS "${MSVC_FLAGS} /bigobj" )
+        endif()
     endif(MSVC)
 
     set(NOMINMAX 1)
@@ -376,11 +384,21 @@ include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${ZLIB_INCLUDE_DIR}
     ${OPENGL_INCLUDE_DIR}
-    ${OPENAL_INCLUDE_DIR}
     ${SIMGEAR_INCLUDE_DIRS}
     ${PLIB_INCLUDE_DIR}
     ${SQLITE3_INCLUDED_DIR} )
 
+if (USE_AEONWAVE)
+    find_package(AAX COMPONENTS aax REQUIRED)
+    include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
+        ${AAX_INCLUDE_DIR}
+    )
+else()
+    include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
+        ${OPENAL_INCLUDE_DIR}
+    )
+endif()
+
 include_directories(${PROJECT_SOURCE_DIR})
 include_directories(${PROJECT_SOURCE_DIR}/src)
 # following is needed, because config.h is include 'bare', whereas