X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=CMakeLists.txt;h=08b2cdd1ee4ca68eabc39bceda385a695c3a988d;hb=2ba4f3ddad94c6045160663578b66bb573fd05ac;hp=2c464cbdae5ec1adad762bdfdb6a4040e45926fd;hpb=905e796e35baae6871e90f97327df29ebe6a09e8;p=flightgear.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c464cbda..08b2cdd1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,11 @@ include (CPack) project(FlightGear) +set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows") +set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows") +set(CMAKE_RELWITHDEBINFO_POSTFIX "rd" CACHE STRING "add a postfix, usually empty on windows") +set(CMAKE_MINSIZEREL_POSTFIX "s" CACHE STRING "add a postfix, usually empty on windows") + # read 'version' file into a variable (stripping any newlines or spaces) file(READ version versionFile) string(STRIP ${versionFile} FLIGHTGEAR_VERSION) @@ -48,7 +53,10 @@ 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" ON) option(ENABLE_JSBSIM "Set to ON to build FlightGear with JSBSim FDM" ON) +option(ENABLE_FGADMIN "Set to ON to build FlightGear with FGADMIN" ON) option(EVENT_INPUT "Set to ON to build FlightGear with event-based Input support" OFF) +option(ENABLE_LIBSVN "Set to ON to build terrasync with libsvnclient support" OFF) + set(MSVC_3RDPARTY_DIR NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted") if(LOGGING) @@ -92,13 +100,28 @@ find_package(Threads REQUIRED) find_package(OpenGL REQUIRED) find_package(OpenAL REQUIRED) find_package(ALUT REQUIRED) -find_package(OpenSceneGraph 2.8.2 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA) +find_package(OpenSceneGraph 2.8.1 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA) + +if(ENABLE_FGADMIN) + find_package(FLTK) +endif(ENABLE_FGADMIN) + +if(ENABLE_LIBSVN) + find_package(SvnClient) + + if(LIBSVN_FOUND) + message(STATUS "libsvn found, enabling in terrasync") + set(HAVE_SVN_CLIENT_H 1) + set(HAVE_LIBSVN_CLIENT_1 1) + endif(LIBSVN_FOUND) +endif(ENABLE_LIBSVN) find_package(PLIB REQUIRED puaux pu js fnt) -find_package(SimGear 2.0.0 REQUIRED) +find_package(SimGear 2.2.0 REQUIRED) 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) # definition depends on OSG version set(CMAKE_REQUIRED_INCLUDES ${OPENSCENEGRAPH_INCLUDE_DIRS}) @@ -152,10 +175,11 @@ if(WIN32) # SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}") # endforeach(warning) - set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS") + set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS") endif(MSVC) set(NOMINMAX 1) + set( WINSOCK_LIBRARY "ws2_32.lib" ) endif(WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT")