Improve CMake strucutre
This commit is contained in:
parent
5820619575
commit
47ff3e9f67
49 changed files with 322 additions and 571 deletions
10
3rdparty/CMakeLists.txt
vendored
10
3rdparty/CMakeLists.txt
vendored
|
@ -12,16 +12,8 @@ add_subdirectory(cjson)
|
|||
|
||||
add_subdirectory(flite_hts_engine)
|
||||
|
||||
if (SYSTEM_HTS_ENGINE)
|
||||
set(HTS_Engine_FIND_REQUIRED TRUE)
|
||||
find_package(HtsEngine)
|
||||
|
||||
include_directories(${HTS_ENGINE_INCLUDE_DIR})
|
||||
message(STATUS "Using HTS engine includes at: ${HTS_ENGINE_INCLUDE_DIR}")
|
||||
message(STATUS "Using HTS engine libraries: ${HTS_ENGINE_LIBRARIES}")
|
||||
else()
|
||||
if (NOT SYSTEM_HTS_ENGINE)
|
||||
add_subdirectory(hts_engine_API)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/hts_engine_API/include )
|
||||
endif()
|
||||
|
||||
if (ENABLE_HID_INPUT)
|
||||
|
|
38
3rdparty/flite_hts_engine/CMakeLists.txt
vendored
38
3rdparty/flite_hts_engine/CMakeLists.txt
vendored
|
@ -2,14 +2,9 @@ if (SYSTEM_FLITE)
|
|||
set(Flite_FIND_REQUIRED TRUE)
|
||||
find_package(Flite)
|
||||
|
||||
include_directories(${FLITE_INCLUDE_DIR})
|
||||
message(STATUS "Using Flite includes at: ${FLITE_INCLUDE_DIR}")
|
||||
message(STATUS "Using Flite libraries: ${FLITE_LIBRARIES}")
|
||||
else()
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/cmulex)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/usenglish)
|
||||
|
||||
set(FLITE_SOURCES
|
||||
flite/src/hrg/cst_ffeature.c
|
||||
flite/src/hrg/cst_item.c
|
||||
|
@ -65,33 +60,26 @@ else()
|
|||
flite/lang/usenglish/usenglish.c
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
add_definitions( -DNO_UNION_INITIALIZATION )
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (SYSTEM_HTS_ENGINE)
|
||||
set(HTS_Engine_FIND_REQUIRED TRUE)
|
||||
find_package(HtsEngine)
|
||||
|
||||
include_directories(${HTS_ENGINE_INCLUDE_DIR})
|
||||
message(STATUS "Using HTS engine includes for Flite/HTS Engine at: ${HTS_ENGINE_INCLUDE_DIR}")
|
||||
else()
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/hts_engine_API/include)
|
||||
endif()
|
||||
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/include)
|
||||
|
||||
add_definitions(-DFLITE_PLUS_HTS_ENGINE)
|
||||
|
||||
add_library(flite_hts STATIC
|
||||
add_library(flightgear_flite_hts STATIC
|
||||
${FLITE_SOURCES}
|
||||
${FLITE_LANG_SOURCES}
|
||||
lib/flite_hts_engine.c
|
||||
)
|
||||
|
||||
target_include_directories(flightgear_flite_hts PUBLIC ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/include)
|
||||
target_compile_definitions(flightgear_flite_hts PRIVATE -DNO_UNION_INITIALIZATION -DFLITE_PLUS_HTS_ENGINE)
|
||||
|
||||
# link against HTSEngine: either our own one, or the system one
|
||||
target_link_libraries(flightgear_flite_hts PUBLIC Flightgear::HTSEngine)
|
||||
|
||||
if (SYSTEM_FLITE)
|
||||
target_link_libraries(flite_hts ${FLITE_LIBRARIES})
|
||||
target_link_libraries(flightgear_flite_hts Flightgear::Flite)
|
||||
else()
|
||||
target_include_directories(flightgear_flite_hts PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/include)
|
||||
target_include_directories(flightgear_flite_hts PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/cmulex)
|
||||
target_include_directories(flightgear_flite_hts PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/usenglish)
|
||||
endif()
|
||||
|
||||
|
||||
|
|
6
3rdparty/hts_engine_API/CMakeLists.txt
vendored
6
3rdparty/hts_engine_API/CMakeLists.txt
vendored
|
@ -1,6 +1,4 @@
|
|||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/hts_engine_API/include)
|
||||
|
||||
set(HTS_ENGINE_SOURCES
|
||||
lib/HTS_audio.c
|
||||
lib/HTS_engine.c
|
||||
|
@ -17,3 +15,7 @@ set(HTS_ENGINE_SOURCES
|
|||
add_library(hts_engine STATIC
|
||||
${HTS_ENGINE_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(hts_engine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
add_library(Flightgear::HTSEngine ALIAS hts_engine)
|
||||
|
|
213
3rdparty/iaxclient/lib/CMakeLists.txt
vendored
213
3rdparty/iaxclient/lib/CMakeLists.txt
vendored
|
@ -1,6 +1,3 @@
|
|||
# CMakeLists.txt, for utils/iaxclient/lib - 20130925
|
||||
# even if we don't select the codec, speex is used for pre-processing audio
|
||||
set(ENABLE_SPEEX 1)
|
||||
|
||||
set(IAXCLIENT_BASE_SOURCES
|
||||
audio_encode.c
|
||||
|
@ -9,7 +6,9 @@ set(IAXCLIENT_BASE_SOURCES
|
|||
codec_alaw.c
|
||||
codec_gsm.c
|
||||
codec_ulaw.c
|
||||
codec_speex.c
|
||||
iaxclient_lib.c
|
||||
spandsp/plc.c
|
||||
)
|
||||
|
||||
set(LIBIAX2_SOURCES
|
||||
|
@ -19,17 +18,51 @@ set(LIBIAX2_SOURCES
|
|||
libiax2/src/md5.c
|
||||
)
|
||||
|
||||
find_package(OpenAL REQUIRED)
|
||||
|
||||
add_library(iaxclient_lib STATIC
|
||||
${IAXCLIENT_BASE_SOURCES} ${LIBIAX2_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(iaxclient_lib PRIVATE Threads::Threads ${OPENAL_LIBRARY})
|
||||
target_include_directories(iaxclient_lib PUBLIC ${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib)
|
||||
target_include_directories(iaxclient_lib PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib/libiax2/src ${OPENAL_INCLUDE_DIR})
|
||||
|
||||
target_compile_definitions(iaxclient_lib PRIVATE AUDIO_OPENAL=1 LIBIAX LIBVER="SVN 261")
|
||||
|
||||
if (APPLE)
|
||||
target_compile_definitions(iaxclient_lib PRIVATE MACOSX)
|
||||
endif(APPLE)
|
||||
|
||||
if (WIN32)
|
||||
target_sources(iaxclient_lib PRIVATE winfuncs.c)
|
||||
else()
|
||||
target_sources(iaxclient_lib PRIVATE unixfuncs.c)
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
if (MSVC)
|
||||
# turn off various warnings
|
||||
set(WFLAGS)
|
||||
foreach(warning 4244 4305 4996)
|
||||
list(APPEND WFLAGS "/wd${warning}")
|
||||
endforeach()
|
||||
target_compile_definitions(iaxclient_lib PRIVATE ${WFLAGS})
|
||||
endif ()
|
||||
|
||||
if (SYSTEM_GSM)
|
||||
set(Gsm_FIND_REQUIRED TRUE)
|
||||
find_package(Gsm)
|
||||
endif(SYSTEM_GSM)
|
||||
|
||||
if (GSM_FOUND)
|
||||
include_directories(${GSM_INCLUDE_DIR})
|
||||
message(STATUS "Using GSM includes at: ${GSM_INCLUDE_DIR}")
|
||||
message(STATUS "Using GSM libraries: ${GSM_LIBRARIES}")
|
||||
else(GSM_FOUND)
|
||||
set(GSM_SOURCES
|
||||
target_include_directories(iaxclient_lib PRIVATE ${GSM_INCLUDE_DIR})
|
||||
target_link_libraries(iaxclient_lib PRIVATE ${GSM_LIBRARIES})
|
||||
else()
|
||||
# add local GSM files
|
||||
target_sources(iaxclient_lib PRIVATE
|
||||
gsm/src/add.c
|
||||
gsm/src/code.c
|
||||
gsm/src/debug.c
|
||||
|
@ -49,117 +82,79 @@ else(GSM_FOUND)
|
|||
gsm/src/short_term.c
|
||||
gsm/src/table.c
|
||||
)
|
||||
endif(GSM_FOUND)
|
||||
|
||||
if (WIN32)
|
||||
list(APPEND IAXCLIENT_BASE_SOURCES winfuncs.c)
|
||||
else()
|
||||
list(APPEND IAXCLIENT_BASE_SOURCES unixfuncs.c)
|
||||
endif(WIN32)
|
||||
target_include_directories(iaxclient_lib PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib/gsm/inc)
|
||||
target_compile_definitions(iaxclient_lib PRIVATE HAS_STRING_H HAS_STDLIB_H)
|
||||
endif()
|
||||
|
||||
if (ENABLE_SPEEX)
|
||||
list(APPEND IAXCLIENT_BASE_SOURCES codec_speex.c)
|
||||
target_compile_definitions(iaxclient_lib PRIVATE CODEC_GSM)
|
||||
|
||||
if (SYSTEM_SPEEX)
|
||||
set(Speex_FIND_REQUIRED TRUE)
|
||||
set(Speexdsp_FIND_REQUIRED TRUE)
|
||||
find_package(Speex)
|
||||
find_package(Speexdsp)
|
||||
endif(SYSTEM_SPEEX)
|
||||
if (SYSTEM_SPEEX)
|
||||
set(Speex_FIND_REQUIRED TRUE)
|
||||
set(Speexdsp_FIND_REQUIRED TRUE)
|
||||
find_package(Speex)
|
||||
find_package(Speexdsp)
|
||||
endif()
|
||||
|
||||
if (SPEEX_FOUND AND SPEEXDSP_FOUND)
|
||||
include_directories(${SPEEX_INCLUDE_DIR} ${SPEEXDSP_INCLUDE_DIR})
|
||||
message(STATUS "Using speex includes at: ${SPEEX_INCLUDE_DIR}")
|
||||
message(STATUS "Using speex libraries: ${SPEEX_LIBRARIES}")
|
||||
message(STATUS "Using speex extended library includes at: ${SPEEXDSP_INCLUDE_DIR}")
|
||||
message(STATUS "Using speex extended library libraries: ${SPEEXDSP_LIBRARIES}")
|
||||
else(SPEEX_FOUND AND SPEEXDSP_FOUND)
|
||||
set(SPEEX_SOURCES
|
||||
libspeex/bits.c
|
||||
libspeex/cb_search.c
|
||||
libspeex/exc_10_16_table.c
|
||||
libspeex/exc_10_32_table.c
|
||||
libspeex/exc_20_32_table.c
|
||||
libspeex/exc_5_256_table.c
|
||||
libspeex/exc_5_64_table.c
|
||||
libspeex/exc_8_128_table.c
|
||||
libspeex/filters.c
|
||||
libspeex/gain_table.c
|
||||
libspeex/gain_table_lbr.c
|
||||
libspeex/hexc_10_32_table.c
|
||||
libspeex/hexc_table.c
|
||||
libspeex/high_lsp_tables.c
|
||||
libspeex/jitter.c
|
||||
libspeex/lbr_48k_tables.c
|
||||
libspeex/lpc.c
|
||||
libspeex/lsp.c
|
||||
libspeex/lsp_tables_nb.c
|
||||
libspeex/ltp.c
|
||||
libspeex/math_approx.c
|
||||
libspeex/mdf.c
|
||||
libspeex/medfilter.c
|
||||
libspeex/misc.c
|
||||
libspeex/modes.c
|
||||
libspeex/nb_celp.c
|
||||
libspeex/preprocess.c
|
||||
libspeex/quant_lsp.c
|
||||
libspeex/sb_celp.c
|
||||
libspeex/smallft.c
|
||||
libspeex/speex.c
|
||||
libspeex/speex_callbacks.c
|
||||
libspeex/speex_header.c
|
||||
libspeex/stereo.c
|
||||
libspeex/vbr.c
|
||||
libspeex/vq.c
|
||||
)
|
||||
if (SPEEX_FOUND AND SPEEXDSP_FOUND)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib/libspeex/include)
|
||||
endif(SPEEX_FOUND AND SPEEXDSP_FOUND)
|
||||
endif(ENABLE_SPEEX)
|
||||
message(STATUS "Using speex includes at: ${SPEEX_INCLUDE_DIR}")
|
||||
message(STATUS "Using speex libraries: ${SPEEX_LIBRARIES}")
|
||||
message(STATUS "Using speex extended library includes at: ${SPEEXDSP_INCLUDE_DIR}")
|
||||
message(STATUS "Using speex extended library libraries: ${SPEEXDSP_LIBRARIES}")
|
||||
|
||||
if (ENABLE_ALSA)
|
||||
list(APPEND IAXCLIENT_BASE_SOURCES audio_alsa.c)
|
||||
endif(ENABLE_ALSA)
|
||||
target_include_directories(iaxclient_lib PRIVATE ${SPEEX_INCLUDE_DIR} ${SPEEXDSP_INCLUDE_DIR})
|
||||
target_link_libraries(iaxclient_lin PRIVATE ${SPEEX_LIBRARIES} ${SPEEXDSP_LIBRARIES})
|
||||
else()
|
||||
target_sources(iaxclient_lib PRIVATE
|
||||
libspeex/bits.c
|
||||
libspeex/cb_search.c
|
||||
libspeex/exc_10_16_table.c
|
||||
libspeex/exc_10_32_table.c
|
||||
libspeex/exc_20_32_table.c
|
||||
libspeex/exc_5_256_table.c
|
||||
libspeex/exc_5_64_table.c
|
||||
libspeex/exc_8_128_table.c
|
||||
libspeex/filters.c
|
||||
libspeex/gain_table.c
|
||||
libspeex/gain_table_lbr.c
|
||||
libspeex/hexc_10_32_table.c
|
||||
libspeex/hexc_table.c
|
||||
libspeex/high_lsp_tables.c
|
||||
libspeex/jitter.c
|
||||
libspeex/lbr_48k_tables.c
|
||||
libspeex/lpc.c
|
||||
libspeex/lsp.c
|
||||
libspeex/lsp_tables_nb.c
|
||||
libspeex/ltp.c
|
||||
libspeex/math_approx.c
|
||||
libspeex/mdf.c
|
||||
libspeex/medfilter.c
|
||||
libspeex/misc.c
|
||||
libspeex/modes.c
|
||||
libspeex/nb_celp.c
|
||||
libspeex/preprocess.c
|
||||
libspeex/quant_lsp.c
|
||||
libspeex/sb_celp.c
|
||||
libspeex/smallft.c
|
||||
libspeex/speex.c
|
||||
libspeex/speex_callbacks.c
|
||||
libspeex/speex_header.c
|
||||
libspeex/stereo.c
|
||||
libspeex/vbr.c
|
||||
libspeex/vq.c
|
||||
)
|
||||
|
||||
if (ENABLE_PORTAUDIO)
|
||||
list(APPEND IAXCLIENT_BASE_SOURCES audio_portaudio.c)
|
||||
endif(ENABLE_PORTAUDIO)
|
||||
target_include_directories(iaxclient_lib PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib/libspeex/include)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
add_definitions(-DMACOSX)
|
||||
endif(APPLE)
|
||||
# never used for the moment
|
||||
# if (ENABLE_ALSA)
|
||||
# target_sources(iaxclient_lib PRIVATE audio_alsa.c)
|
||||
# endif(ENABLE_ALSA)
|
||||
|
||||
list(APPEND IAXCLIENT_BASE_SOURCES spandsp/plc.c)
|
||||
|
||||
add_definitions(-DAUDIO_OPENAL=1)
|
||||
add_definitions(-DLIBIAX)
|
||||
|
||||
# for GSM
|
||||
add_definitions(-DHAS_STRING_H -DHAS_STDLIB_H)
|
||||
add_definitions(-DCODEC_GSM)
|
||||
|
||||
if (MSVC)
|
||||
# turn off various warnings
|
||||
set(WFLAGS)
|
||||
foreach(warning 4244 4305 4996)
|
||||
set(WFLAGS "${WFLAGS} /wd${warning}")
|
||||
endforeach()
|
||||
add_definitions(${WFLAGS})
|
||||
endif ()
|
||||
|
||||
add_definitions( -DHAVE_CONFIG_H ) # to use fgfs config.h to get FG version, if needed
|
||||
add_definitions( -DLIBVER="SVN 261" ) # add an iaxclient_lib version string
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib/libiax2/src)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib/gsm/inc)
|
||||
|
||||
add_library(iaxclient_lib STATIC
|
||||
${IAXCLIENT_BASE_SOURCES}
|
||||
${GSM_SOURCES}
|
||||
${SPEEX_SOURCES}
|
||||
${LIBIAX2_SOURCES})
|
||||
|
||||
target_link_libraries(iaxclient_lib ${CMAKE_THREAD_LIBS_INIT} ${SPEEX_LIBRARIES} ${SPEEXDSP_LIBRARIES} ${GSM_LIBRARIES})
|
||||
# if (ENABLE_PORTAUDIO)
|
||||
# target_sources(iaxclient_lib PRIVATE audio_portaudio.c)
|
||||
# endif(ENABLE_PORTAUDIO)
|
||||
|
||||
# eof
|
||||
|
|
|
@ -138,7 +138,7 @@ static int history_put(jitterbuf *jb, long ts, long now, long ms)
|
|||
|
||||
/* check for drastic change in delay */
|
||||
if (jb->info.conf.resync_threshold != -1) {
|
||||
if (abs(delay - jb->info.last_delay) > threshold) {
|
||||
if (labs(delay - jb->info.last_delay) > threshold) {
|
||||
jb->info.cnt_delay_discont++;
|
||||
if (jb->info.cnt_delay_discont > 3) {
|
||||
/* resync the jitterbuffer */
|
||||
|
|
1
3rdparty/sqlite3/CMakeLists.txt
vendored
1
3rdparty/sqlite3/CMakeLists.txt
vendored
|
@ -3,3 +3,4 @@ add_library(fgsqlite3 STATIC sqlite3.c)
|
|||
|
||||
target_compile_definitions(fgsqlite3 PRIVATE SQLITE_OMIT_LOAD_EXTENSION NDEBUG)
|
||||
set_target_properties(fgsqlite3 PROPERTIES COMPILE_FLAGS "-fPIC -fno-fast-math")
|
||||
target_include_directories(fgsqlite3 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
164
CMakeLists.txt
164
CMakeLists.txt
|
@ -72,6 +72,7 @@ include(GNUInstallDirs)
|
|||
include( DetectDistro )
|
||||
include( DetectBrowser )
|
||||
include( ExportDebugSymbols )
|
||||
|
||||
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 "" CACHE STRING "add a postfix, usually empty on windows")
|
||||
|
@ -100,17 +101,12 @@ else()
|
|||
message(STATUS "Using default data directory for base package: ${FG_DATA_DIR}")
|
||||
endif()
|
||||
|
||||
# Change the default build type to something fast
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING
|
||||
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
||||
FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
#####################################################################################
|
||||
# Configure library search paths
|
||||
#####################################################################################
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
IF(APPLE)
|
||||
set(EVENT_INPUT_DEFAULT 1)
|
||||
|
||||
|
@ -124,12 +120,11 @@ elseif(WIN32)
|
|||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")
|
||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
MESSAGE("Installing: ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}")
|
||||
message(STATUS "Installing: ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}")
|
||||
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
|
||||
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
|
||||
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
set(USE_DBUS_DEFAULT 1)
|
||||
|
@ -171,7 +166,6 @@ option(ENABLE_YASIM "Set to ON to build FlightGear with YASIM FDM (default)
|
|||
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})
|
||||
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(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})
|
||||
|
@ -183,10 +177,9 @@ option(SYSTEM_CPPUNIT "Set to ON to build Flightgear with the system's CppUni
|
|||
|
||||
# additional utilities
|
||||
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(WITH_FGPANEL "Set to ON to build the fgpanel application" OFF)
|
||||
option(ENABLE_FGVIEWER "Set to ON to build the fgviewer application (default)" ON)
|
||||
option(ENABLE_GPSSMOOTH "Set to ON to build the GPSsmooth application (default)" ON)
|
||||
option(ENABLE_TERRASYNC "Set to ON to build the terrasync application (default)" ON)
|
||||
option(ENABLE_FGJS "Set to ON to build the fgjs application (default)" ON)
|
||||
option(ENABLE_JS_DEMO "Set to ON to build the js_demo application (default)" ON)
|
||||
option(ENABLE_METAR "Set to ON to build the metar application (default)" ON)
|
||||
|
@ -225,13 +218,8 @@ if(SP_FDMS)
|
|||
set(ENABLE_SP_FDM 1)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib/libspeex/include)
|
||||
endif()
|
||||
|
||||
if(ENABLE_FGCOM)
|
||||
set(ENABLE_IAX 1)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/iaxclient/lib ) # for iaxclient.h
|
||||
endif()
|
||||
|
||||
# Setup MSVC 3rd party directories
|
||||
|
@ -265,31 +253,7 @@ if(EVENT_INPUT)
|
|||
endif()
|
||||
endif(EVENT_INPUT)
|
||||
|
||||
if (ENABLE_SWIFT)
|
||||
# DBUS
|
||||
|
||||
# our local FindDBus.cmake file uses pkg-config on non-Windows
|
||||
# we want to ensure our local prefixes are searched, so set this
|
||||
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH 1)
|
||||
|
||||
# unfortunately CMAKE_INSTALL_PREFIX is not searched, so add that manually
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
find_package(DBus)
|
||||
|
||||
#libevent
|
||||
find_package(LibEvent)
|
||||
|
||||
if (DBUS_FOUND AND LIBEVENT_FOUND)
|
||||
message(STATUS "SWIFT support enabled")
|
||||
list(APPEND PLATFORM_LIBS ${LIBEVENT_LIB})
|
||||
# FIXME, make this target specific, not a global include setting
|
||||
include_directories(${LIBEVENT_INCLUDE_DIR})
|
||||
else()
|
||||
message(WARNING "SWIFT support disabled, dbus and/or LibEvent not found")
|
||||
set(ENABLE_SWIFT 0)
|
||||
endif()
|
||||
endif()
|
||||
include(SetupSwiftLibraries)
|
||||
|
||||
if (SYSTEM_CPPUNIT)
|
||||
find_package(CppUnit REQUIRED)
|
||||
|
@ -321,50 +285,25 @@ if (TARGET sentry::sentry)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
#if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
# include_directories("${CMAKE_SOURCE_DIR}/3rdparty/iaxclient/lib/libspeex/include")
|
||||
#endif()
|
||||
|
||||
##############################################################################
|
||||
## Sqlite3 setup
|
||||
|
||||
if (SYSTEM_SQLITE)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
message(STATUS "Using system SQLite3 library")
|
||||
else()
|
||||
set(SQLITE3_INCLUDED_DIR "${CMAKE_SOURCE_DIR}/3rdparty/sqlite3")
|
||||
# this target is defined in src/Navaids/CMakeLists.txt
|
||||
list(APPEND SQLITE3_LIBRARY fgsqlite3)
|
||||
endif (SYSTEM_SQLITE)
|
||||
|
||||
# Sqlite always depends on the threading lib
|
||||
list(APPEND SQLITE3_LIBRARY ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
##############################################################################
|
||||
## DBus setup
|
||||
|
||||
if (USE_DBUS)
|
||||
include(FindPkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(DBUS dbus-1)
|
||||
endif (PKG_CONFIG_FOUND) #if we don't have pkg-config, assume we don't have libdbus-1-dev either http://packages.debian.org/sid/libdbus-1-dev
|
||||
if (DBUS_FOUND)
|
||||
set(HAVE_DBUS 1)
|
||||
message(STATUS "Using DBus")
|
||||
include_directories( ${DBUS_INCLUDE_DIRS})
|
||||
else()
|
||||
message(STATUS "DBus not found, screensaver control disabled")
|
||||
endif (DBUS_FOUND)
|
||||
else()
|
||||
find_package(DBus)
|
||||
endif (USE_DBUS)
|
||||
|
||||
##############################################################################
|
||||
## Qt5 setup setup
|
||||
if (ENABLE_QT)
|
||||
message(STATUS "Qt launcher enabled, checking for Qt >= 5.9 / qmake")
|
||||
find_package(Qt5 5.9 COMPONENTS Widgets Gui Network Qml Quick Svg)
|
||||
if (Qt5Widgets_FOUND)
|
||||
message(STATUS "Will enable Qt launcher GUI")
|
||||
set(HAVE_QT 1)
|
||||
include (Translations)
|
||||
|
||||
|
@ -375,7 +314,9 @@ if (ENABLE_QT)
|
|||
get_filename_component(FG_QT_ROOT_DIR ${FG_QT_BIN_DIR} DIRECTORY)
|
||||
endif()
|
||||
|
||||
message(STATUS "Qt GUI enabled, found Qt at: ${FG_QT_ROOT_DIR}")
|
||||
else()
|
||||
message(STATUS "Qt GUI disabled, Qt/qmake not found in PATH/CMAKE_PREFIX_PATH")
|
||||
# don't try to build FGQCanvas if Qt wasn't found correctly
|
||||
set(ENABLE_FGQCANVAS OFF)
|
||||
endif()
|
||||
|
@ -387,13 +328,11 @@ if (ENABLE_QT)
|
|||
check_include_file_cxx("private/qopenglcontext_p.h" REALLY_HAVE_QGUIPRIVATE)
|
||||
|
||||
if (REALLY_HAVE_QGUIPRIVATE)
|
||||
message(STATUS "Have QtGUI private headers")
|
||||
set(ENABLE_QQ_UI 1)
|
||||
else()
|
||||
message(STATUS "QtGui private headers not available.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Qt support disabled")
|
||||
set(ENABLE_FGQCANVAS OFF)
|
||||
endif (ENABLE_QT)
|
||||
##############################################################################
|
||||
|
@ -414,50 +353,13 @@ find_package(SimGear ${MIN_SIMGEAR_VERSION} CONFIG REQUIRED)
|
|||
|
||||
##############################################################################
|
||||
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
|
||||
check_include_file(windows.h HAVE_WINDOWS_H)
|
||||
check_function_exists(timegm HAVE_TIMEGM)
|
||||
check_variable_exists(daylight HAVE_DAYLIGHT)
|
||||
check_function_exists(ftime HAVE_FTIME)
|
||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
|
||||
if(ENABLE_PROFILE)
|
||||
find_package(GooglePerfTools REQUIRED)
|
||||
set(FG_HAVE_GPERFTOOLS 1)
|
||||
message(STATUS "Built-in profiler using gperftools available")
|
||||
endif()
|
||||
|
||||
if(ENABLE_RTI)
|
||||
message(STATUS "RTI: ENABLED")
|
||||
set(FG_HAVE_HLA 1)
|
||||
else()
|
||||
message(STATUS "RTI: DISABLED")
|
||||
endif(ENABLE_RTI)
|
||||
|
||||
if(ENABLE_GDAL)
|
||||
find_package(GDAL 2.0.0 REQUIRED)
|
||||
endif(ENABLE_GDAL)
|
||||
include_directories(${GDAL_INCLUDE_DIR})
|
||||
|
||||
if (ENABLE_OPENMP)
|
||||
find_package(OpenMP)
|
||||
if(OPENMP_FOUND)
|
||||
message(STATUS "OpenMP: ENABLED")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
else()
|
||||
message(STATUS "OpenMP: NOT FOUND")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "OpenMP: DISABLED")
|
||||
endif()
|
||||
|
||||
if (ENABLE_SIMD)
|
||||
message(STATUS "SSE/SSE2 support: ENABLED")
|
||||
else()
|
||||
message(STATUS "SSE/SSE2 support: DISABLED")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -475,17 +377,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Ap
|
|||
-Wno-inconsistent-missing-override \
|
||||
-Wno-unused-local-typedef")
|
||||
|
||||
# disabled by James - these cause weridness for multi-config generators
|
||||
# since they set thge flags for all configurations
|
||||
# need to find a better way to adjust these
|
||||
|
||||
# if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
# set(CMAKE_C_FLAGS
|
||||
# "${CMAKE_C_FLAGS} -O0 -fno-omit-frame-pointer -fno-inline-functions")
|
||||
# set(CMAKE_CXX_FLAGS
|
||||
# "${CMAKE_CXX_FLAGS} -O0 -fno-omit-frame-pointer -fno-inline-functions")
|
||||
# endif()
|
||||
|
||||
# override CMake default RelWithDebInfo flags.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
|
||||
|
@ -551,40 +442,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS_C} ${MSVC_FLAGS} -D_REENTRAN
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS_CXX} ${MSVC_FLAGS} -D_REENTRANT ${BOOST_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}")
|
||||
|
||||
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
${SIMGEAR_INCLUDE_DIRS}
|
||||
${PLIB_INCLUDE_DIR}
|
||||
${SQLITE3_INCLUDED_DIR} )
|
||||
|
||||
if (USE_AEONWAVE)
|
||||
find_package(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
|
||||
# version.h is included as <Include/version.h> - this should be cleaned up
|
||||
include_directories(${PROJECT_BINARY_DIR}/src)
|
||||
include_directories(${PROJECT_BINARY_DIR}/src/Include)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/hts_engine_API/include )
|
||||
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/include )
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
include (CheckPOSIXFeatures)
|
||||
|
||||
set(FG_TEST_SUITE_DATA "${CMAKE_SOURCE_DIR}/test_suite/test_data")
|
||||
|
||||
check_function_exists(mkfifo HAVE_MKFIFO)
|
||||
|
||||
# configure a header file to pass some of the CMake settings
|
||||
# to the source code
|
||||
configure_file (
|
||||
|
@ -601,6 +463,12 @@ configure_file (
|
|||
# Setup build.h header, each build
|
||||
include( GenerateBuildInfo )
|
||||
|
||||
# global includes: these are used by every singl target, so we do set them globally
|
||||
# even though that's not stricly best practice
|
||||
include_directories(${PROJECT_BINARY_DIR}/src/Include)
|
||||
include_directories(${PROJECT_BINARY_DIR}/src) # for version.h
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src)
|
||||
|
||||
add_subdirectory(3rdparty)
|
||||
add_subdirectory(utils)
|
||||
|
||||
|
|
9
CMakeModules/CheckPOSIXFeatures.cmake
Normal file
9
CMakeModules/CheckPOSIXFeatures.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
check_function_exists(mkfifo HAVE_MKFIFO)
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
|
||||
check_include_file(windows.h HAVE_WINDOWS_H)
|
||||
check_function_exists(timegm HAVE_TIMEGM)
|
||||
check_variable_exists(daylight HAVE_DAYLIGHT)
|
||||
check_function_exists(ftime HAVE_FTIME)
|
||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
|
@ -22,3 +22,4 @@ set(CPACK_SOURCE_GENERATOR TBZ2)
|
|||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "flightgear-${FLIGHTGEAR_VERSION}" CACHE INTERNAL "tarball basename")
|
||||
|
||||
include (CPack)
|
||||
|
||||
|
|
|
@ -61,10 +61,4 @@ if (MSVC AND MSVC_3RDPARTY_ROOT)
|
|||
message(STATUS "BOOST_INCLUDEDIR is ${BOOST_INCLUDEDIR}")
|
||||
endif()
|
||||
|
||||
if (USE_AEONWAVE)
|
||||
find_package(AAX COMPONENTS aax REQUIRED)
|
||||
else()
|
||||
set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include)
|
||||
set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib)
|
||||
endif()
|
||||
endif (MSVC AND MSVC_3RDPARTY_ROOT)
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
# Find CrashRpt
|
||||
# ~~~~~~~~~~~~
|
||||
# Copyright (c) 2014, James Turner <zakalawe at mac dot com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
# CMake module to search for CrashRpt library
|
||||
#
|
||||
# If it's found it sets CRASHRPT_FOUND to TRUE
|
||||
# and following variables are set:
|
||||
# CRASHRPT_FOUND_INCLUDE_DIR
|
||||
# CRASHRPT_FOUND_LIBRARY
|
||||
|
||||
FIND_PATH(CRASHRPT_INCLUDE_DIR CrashRpt.h
|
||||
PATH_SUFFIXES include
|
||||
HINTS $ENV{CRASHRPTDIR}
|
||||
PATHS
|
||||
${ADDITIONAL_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
set(CRASHRPPT_LIBRARIES "")
|
||||
|
||||
FIND_LIBRARY(CRASHRPT_LIBRARY NAMES CrashRpt1402 CrashRpt1403
|
||||
HINTS $ENV{CRASHRPTDIR}
|
||||
PATH_SUFFIXES lib
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CRASHRPT DEFAULT_MSG
|
||||
CRASHRPT_LIBRARY CRASHRPT_INCLUDE_DIR)
|
|
@ -19,19 +19,14 @@ else()
|
|||
find_package(PkgConfig QUIET)
|
||||
|
||||
if(PKG_CONFIG_FOUND)
|
||||
# FIXME : clean this up once we requrie CMake 3.6
|
||||
if(CMAKE_VERSION VERSION_LESS 3.6)
|
||||
pkg_check_modules(DBUS dbus-1)
|
||||
else()
|
||||
pkg_check_modules(DBUS IMPORTED_TARGET dbus-1)
|
||||
endif()
|
||||
pkg_check_modules(DBUS IMPORTED_TARGET dbus-1)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
|
||||
if(DBUS_FOUND)
|
||||
set_target_properties(PkgConfig::DBUS PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
|
||||
set(HAVE_DBUS 1)
|
||||
# alias the PkgConfig name to standard one
|
||||
add_library(DBus ALIAS PkgConfig::DBUS)
|
||||
endif(DBUS_FOUND)
|
||||
endif(WIN32)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBus DEFAULT_MSG
|
||||
DBUS_INCLUDE_DIRS DBUS_LIBRARIES)
|
|
@ -117,3 +117,12 @@ else (FLITE_LIBRARIES AND FLITE_INCLUDE_DIRS)
|
|||
mark_as_advanced(FLITE_INCLUDE_DIRS FLITE_LIBRARIES)
|
||||
|
||||
endif (FLITE_LIBRARIES AND FLITE_INCLUDE_DIRS)
|
||||
|
||||
if(NOT TARGET Flightgear::Flite)
|
||||
add_library(Flightgear::Flite UNKNOWN IMPORTED)
|
||||
set_target_properties(Flightgear::Flite PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FLITE_INCLUDE_DIRS}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${FLITE_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES ${FLITE_USENGLISH_LIBRARY} ${FLITE_CMU_US_KAL_LIBRARY} ${FLITE_CMULEX_LIBRARY})
|
||||
endif()
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
# - Try to find GooglePerfTools headers and libraries
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# find_package(GooglePerfTools)
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# GooglePerfTools_ROOT_DIR Set this variable to the root installation of
|
||||
# GooglePerfTools if the module has problems finding
|
||||
# the proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# GooglePerfTools_FOUND System has GooglePerfTools libs/headers
|
||||
# GooglePerfTools_LIBRARIES The GooglePerfTools libraries
|
||||
# GooglePerfTools_INCLUDE_DIR The location of GooglePerfTools headers
|
||||
|
||||
find_path(GooglePerfTools_ROOT_DIR
|
||||
NAMES include/google/profiler.h
|
||||
)
|
||||
|
||||
find_path(GooglePerfTools_INCLUDE_DIR
|
||||
NAMES google/profiler.h
|
||||
HINTS ${GooglePerfTools_ROOT_DIR}
|
||||
)
|
||||
|
||||
find_library(GooglePerfTools_PROFILER_LIBRARY
|
||||
NAMES profiler
|
||||
HINTS ${GooglePerfTools_ROOT_DIR}
|
||||
)
|
||||
|
||||
set(GooglePerfTools_LIBRARIES ${GooglePerfTools_PROFILER_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GooglePerfTools
|
||||
"Try setting GooglePerfTools_ROOT_DIR to root of your gperftools installation"
|
||||
GooglePerfTools_LIBRARIES
|
||||
GooglePerfTools_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
GooglePerfTools_ROOT_DIR
|
||||
GooglePerfTools_LIBRARIES
|
||||
GooglePerfTools_PROFILER_LIBRARY
|
||||
GooglePerfTools_INCLUDE_DIR
|
||||
)
|
|
@ -76,3 +76,11 @@ else (HTS_ENGINE_LIBRARIES AND HTS_ENGINE_INCLUDE_DIRS)
|
|||
mark_as_advanced(HTS_ENGINE_INCLUDE_DIRS HTS_ENGINE_LIBRARIES)
|
||||
|
||||
endif (HTS_ENGINE_LIBRARIES AND HTS_ENGINE_INCLUDE_DIRS)
|
||||
|
||||
if(NOT TARGET Flightgear::HTSEngine)
|
||||
add_library(Flightgear::HTSEngine UNKNOWN IMPORTED)
|
||||
set_target_properties(Flightgear::HTSEngine PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${HTS_ENGINE_INCLUDE_DIRS}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${HTS_ENGINE_LIBRARY}")
|
||||
endif()
|
||||
|
|
|
@ -3,10 +3,28 @@
|
|||
# LIBEVENT_LIB
|
||||
# LIBEVENT_INCLUDE_DIR
|
||||
|
||||
FIND_PATH(LIBEVENT_INCLUDE_DIR event2/event.h PATH_SUFFIXES include HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||
if(WIN32)
|
||||
FIND_PATH(LIBEVENT_INCLUDE_DIR event2/event.h PATH_SUFFIXES include HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||
FIND_LIBRARY(LIBEVENT_LIB NAMES event_core PATH_SUFFIXES lib HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||
|
||||
FIND_LIBRARY(LIBEVENT_LIB NAMES event_core PATH_SUFFIXES lib HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||
if (LIBEVENT_INCLUDE_DIR AND LIBEVENT_LIB)
|
||||
add_library(libEvent UNKNOWN IMPORTED)
|
||||
set_target_properties(libEvent PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${LIBEVENT_LIB}"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibEvent DEFAULT_MSG
|
||||
LIBEVENT_INCLUDE_DIR LIBEVENT_LIB)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(libEvent QUIET IMPORTED_TARGET libevent)
|
||||
endif()
|
||||
|
||||
if(LIBEVENT_FOUND)
|
||||
set_target_properties(PkgConfig::libEvent PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
|
||||
# alias the PkgConfig name to standard one
|
||||
add_library(libEvent ALIAS PkgConfig::libEvent)
|
||||
endif()
|
||||
endif(WIN32)
|
||||
|
|
|
@ -25,29 +25,9 @@
|
|||
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
set(save_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK})
|
||||
set(CMAKE_FIND_FRAMEWORK ONLY)
|
||||
FIND_PATH(PLIB_INCLUDE_DIR ul.h
|
||||
PATH_SUFFIXES include/plib include
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
)
|
||||
set(CMAKE_FIND_FRAMEWORK ${save_FIND_FRAMEWORK})
|
||||
|
||||
if(NOT PLIB_INCLUDE_DIR)
|
||||
FIND_PATH(PLIB_INCLUDE_DIR plib/ul.h
|
||||
PATH_SUFFIXES include
|
||||
HINTS $ENV{PLIBDIR}
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS ${PLIB_INCLUDE_DIR})
|
||||
|
||||
# check for dynamic framework on Mac ()
|
||||
FIND_LIBRARY(PLIB_LIBRARIES
|
||||
NAMES plib PLIB
|
||||
HINTS
|
||||
$ENV{PLIBDIR}
|
||||
FIND_PATH(PLIB_INCLUDE_DIR plib/ul.h
|
||||
PATH_SUFFIXES include
|
||||
HINTS $ENV{PLIBDIR}
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
|
@ -97,35 +77,31 @@ macro(find_static_component comp libs)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
if(${PLIB_LIBRARIES} STREQUAL "PLIB_LIBRARIES-NOTFOUND")
|
||||
set(PLIB_LIBRARIES "") # clear value
|
||||
|
||||
# based on the contents of deps, add other required PLIB
|
||||
# static library dependencies. Eg PUI requires FNT
|
||||
set(outDeps ${PLIB_FIND_COMPONENTS})
|
||||
set(outDeps ${PLIB_FIND_COMPONENTS})
|
||||
|
||||
foreach(c ${PLIB_FIND_COMPONENTS})
|
||||
if (${c} STREQUAL "pu")
|
||||
# handle MSVC confusion over pu/pui naming, by removing
|
||||
# 'pu' and then adding it back
|
||||
list(REMOVE_ITEM outDeps "pu" "fnt" "sg")
|
||||
list(APPEND outDeps ${PUNAME} "sg")
|
||||
elseif (${c} STREQUAL "puaux")
|
||||
list(APPEND outDeps ${PUNAME} "sg")
|
||||
elseif (${c} STREQUAL "ssg")
|
||||
list(APPEND outDeps "sg")
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(c ${PLIB_FIND_COMPONENTS})
|
||||
if (${c} STREQUAL "pu")
|
||||
# handle MSVC confusion over pu/pui naming, by removing
|
||||
# 'pu' and then adding it back
|
||||
list(REMOVE_ITEM outDeps "pu" "fnt" "sg")
|
||||
list(APPEND outDeps ${PUNAME} "sg")
|
||||
elseif (${c} STREQUAL "puaux")
|
||||
list(APPEND outDeps ${PUNAME} "sg")
|
||||
elseif (${c} STREQUAL "ssg")
|
||||
list(APPEND outDeps "sg")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(APPEND outDeps "ul") # everything needs ul
|
||||
list(REMOVE_DUPLICATES outDeps) # clean up
|
||||
list(APPEND outDeps "ul") # everything needs ul
|
||||
list(REMOVE_DUPLICATES outDeps) # clean up
|
||||
|
||||
|
||||
# look for traditional static libraries
|
||||
foreach(component ${outDeps})
|
||||
find_static_component(${component} PLIB_LIBRARIES)
|
||||
endforeach()
|
||||
endif()
|
||||
# look for traditional static libraries
|
||||
foreach(component ${outDeps})
|
||||
find_static_component(${component} PLIB_LIBRARIES)
|
||||
endforeach()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PLIB DEFAULT_MSG PLIB_LIBRARIES PLIB_INCLUDE_DIR)
|
||||
|
|
|
@ -32,5 +32,16 @@ FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3
|
|||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
)
|
||||
|
||||
find_package(Threads)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
|
||||
|
||||
if(NOT TARGET fgsqlite3)
|
||||
add_library(fgsqlite3 UNKNOWN IMPORTED)
|
||||
set_target_properties(fgsqlite3 PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SQLITE3_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${SQLITE3_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads)
|
||||
endif()
|
||||
|
|
16
CMakeModules/Installation.cmake
Normal file
16
CMakeModules/Installation.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
if (APPLE)
|
||||
install(TARGETS fgfs BUNDLE DESTINATION .)
|
||||
else()
|
||||
install(TARGETS fgfs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
if (TARGET sentry_crashpad::handler)
|
||||
if (APPLE)
|
||||
# install inside the bundle
|
||||
install(FILES $<TARGET_FILE:sentry_crashpad::handler> DESTINATION fgfs.app/Contents/MacOS OPTIONAL)
|
||||
else()
|
||||
# install in the bin-dir, next to the application binary
|
||||
install(FILES $<TARGET_FILE:sentry_crashpad::handler> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||
endif()
|
||||
endif()
|
|
@ -1,10 +1,12 @@
|
|||
function(setup_fgfs_includes)
|
||||
function(setup_fgfs_includes target)
|
||||
if(ENABLE_JSBSIM)
|
||||
# FIXME - remove once JSBSim doesn't expose private headers
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
|
||||
target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
|
||||
endif()
|
||||
|
||||
if(FG_HAVE_GPERFTOOLS)
|
||||
include_directories(${GooglePerfTools_INCLUDE_DIR})
|
||||
endif()
|
||||
target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/cjson)
|
||||
|
||||
# only actually needed for httpd.cxx
|
||||
target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/mongoose)
|
||||
|
||||
endfunction()
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
function(setup_fgfs_libraries target)
|
||||
link_directories ( ${Boost_LIBRARY_DIRS} )
|
||||
|
||||
get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
|
||||
#message(STATUS "fg libs ${FG_LIBS}")
|
||||
#message(STATUS "OSG libs ${OPENSCENEGRAPH_LIBRARIES}")
|
||||
|
@ -12,58 +10,34 @@ function(setup_fgfs_libraries target)
|
|||
set(HLA_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
if(GDAL_FOUND)
|
||||
set(GDAL_LIBRARIES ${GDAL_LIBRARY})
|
||||
else()
|
||||
set(GDAL_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
if(ENABLE_JSBSIM)
|
||||
target_link_libraries(${target} JSBSim)
|
||||
endif()
|
||||
|
||||
if(ENABLE_IAX)
|
||||
target_link_libraries(${target} iaxclient_lib ${OPENAL_LIBRARY})
|
||||
target_link_libraries(${target} iaxclient_lib)
|
||||
endif()
|
||||
|
||||
# manually created DBus target
|
||||
if(TARGET DBus)
|
||||
target_link_libraries(${target} DBus)
|
||||
endif()
|
||||
|
||||
# PkgConfig::DBUS target
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.6)
|
||||
if(DBUS_FOUND)
|
||||
target_link_libraries(${target} ${DBUS_LDFLAGS})
|
||||
endif()
|
||||
else()
|
||||
# PkgConfig::DBUS target
|
||||
if(TARGET PkgConfig::DBUS)
|
||||
target_link_libraries(${target} PkgConfig::DBUS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FG_HAVE_GPERFTOOLS)
|
||||
target_link_libraries(${target} ${GooglePerfTools_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(X11_FOUND)
|
||||
target_link_libraries(${target} ${X11_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(${target} fgsqlite3 fgvoicesynth)
|
||||
|
||||
target_link_libraries(${target}
|
||||
SimGearCore
|
||||
SimGearScene
|
||||
Boost::boost
|
||||
${EVENT_INPUT_LIBRARIES}
|
||||
${GDAL_LIBRARIES}
|
||||
${HLA_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${OPENSCENEGRAPH_LIBRARIES}
|
||||
${PLATFORM_LIBS}
|
||||
${PLIB_LIBRARIES}
|
||||
${SQLITE3_LIBRARY}
|
||||
${SIMGEAR_LIBRARIES}
|
||||
)
|
||||
|
||||
if (ENABLE_PLIB_JOYSTICK)
|
||||
|
@ -72,21 +46,11 @@ function(setup_fgfs_libraries target)
|
|||
|
||||
target_link_libraries(${target} PLIBFont)
|
||||
|
||||
if(SYSTEM_HTS_ENGINE)
|
||||
target_link_libraries(${target} flite_hts ${HTS_ENGINE_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(${target} flite_hts hts_engine)
|
||||
endif()
|
||||
|
||||
if(Qt5Core_FOUND)
|
||||
if (TARGET fglauncher)
|
||||
target_link_libraries(${target} Qt5::Core Qt5::Widgets fglauncher fgqmlui)
|
||||
set_property(TARGET ${target} PROPERTY AUTOMOC ON)
|
||||
endif()
|
||||
|
||||
if(USE_AEONWAVE)
|
||||
target_link_libraries(${target} ${AAX_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
target_link_libraries(${target} execinfo)
|
||||
endif()
|
||||
|
|
19
CMakeModules/SetupSwiftLibraries.cmake
Normal file
19
CMakeModules/SetupSwiftLibraries.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
if (ENABLE_SWIFT)
|
||||
# DBUS
|
||||
# our local FindDBus.cmake file uses pkg-config on non-Windows
|
||||
# we want to ensure our local prefixes are searched, so set this
|
||||
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH 1)
|
||||
|
||||
# unfortunately CMAKE_INSTALL_PREFIX is not searched, so add that manually
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
find_package(DBus)
|
||||
find_package(LibEvent)
|
||||
|
||||
if (TARGET DBus AND TARGET libEvent)
|
||||
message(STATUS "SWIFT support enabled")
|
||||
else()
|
||||
message(STATUS "SWIFT support disabled, dbus and/or LibEvent not found")
|
||||
set(ENABLE_SWIFT 0)
|
||||
endif()
|
||||
endif()
|
|
@ -16,7 +16,8 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#include "AIBaseAircraft.hxx"
|
||||
#include <src/Main/globals.hxx>
|
||||
|
||||
#include <Main/globals.hxx>
|
||||
|
||||
FGAIBaseAircraft::FGAIBaseAircraft() : FGAIBase(otStatic, false)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ class FGAIBaseAircraft : public FGAIBase {
|
|||
public:
|
||||
FGAIBaseAircraft();
|
||||
|
||||
void bind();
|
||||
void bind() override;
|
||||
|
||||
// Note that this is mapped to all 6 gear indices gear/gear[0..5]
|
||||
void setGearPos(double pos) { m_gearPos = pos; };
|
||||
|
|
|
@ -49,14 +49,8 @@ set(HEADERS
|
|||
|
||||
# Add sources if swift support is enabled
|
||||
if(ENABLE_SWIFT)
|
||||
set(HEADERS
|
||||
${HEADERS}
|
||||
AISwiftAircraft.h
|
||||
)
|
||||
set(SOURCES
|
||||
${SOURCES}
|
||||
AISwiftAircraft.cpp
|
||||
)
|
||||
list(APPEND HEADERS AISwiftAircraft.h)
|
||||
list(APPEND SOURCES AISwiftAircraft.cpp)
|
||||
endif()
|
||||
|
||||
flightgear_component(AIModel "${SOURCES}" "${HEADERS}")
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
include_directories(${PROJECT_SOURCE_DIR})
|
||||
|
||||
# note order here affects link order, and hence linking correctness
|
||||
# on systems with a traditional ld (eg, GNU ld on Linux)
|
||||
foreach( mylibfolder
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
add_executable(fgrcc fgrcc.cxx fgrcc.hxx)
|
||||
target_link_libraries(fgrcc SimGearCore ${PLATFORM_LIBS})
|
||||
target_link_libraries(fgrcc SimGearCore)
|
||||
|
||||
# On Windows, make sure fgrcc can be run (it needs third-party libraries) in add_custom_target
|
||||
if(MSVC)
|
||||
|
|
|
@ -182,8 +182,5 @@ endif()
|
|||
|
||||
if(ENABLE_JSBSIM)
|
||||
add_subdirectory(JSBSim)
|
||||
|
||||
# FIXME - push this down once JSBSim doesn't expose private headers
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -66,8 +66,7 @@ setup_fgfs_embedded_resources()
|
|||
# Sort the sources and headers for MSVC.
|
||||
setup_msvc_grouping()
|
||||
|
||||
# Additional search paths for includes.
|
||||
setup_fgfs_includes()
|
||||
|
||||
|
||||
# All sources and headers to be built into fgfs.
|
||||
get_property(FG_SOURCES GLOBAL PROPERTY FG_SOURCES)
|
||||
|
@ -104,34 +103,16 @@ endif()
|
|||
# Set up the target links.
|
||||
setup_fgfs_libraries(fgfs)
|
||||
export_debug_symbols(fgfs)
|
||||
|
||||
if (APPLE)
|
||||
install(TARGETS fgfs BUNDLE DESTINATION .)
|
||||
else()
|
||||
install(TARGETS fgfs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
# Additional search paths for includes.
|
||||
setup_fgfs_includes(fgfs)
|
||||
|
||||
if (TARGET sentry::sentry)
|
||||
target_link_libraries(fgfs sentry::sentry)
|
||||
endif()
|
||||
|
||||
if (TARGET sentry_crashpad::handler)
|
||||
if (APPLE)
|
||||
# install inside the bundle
|
||||
install(FILES $<TARGET_FILE:sentry_crashpad::handler> DESTINATION fgfs.app/Contents/MacOS OPTIONAL)
|
||||
else()
|
||||
# install in the bin-dir, next to the application binary
|
||||
install(FILES $<TARGET_FILE:sentry_crashpad::handler> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_METAR)
|
||||
add_executable(metar metar_main.cxx)
|
||||
target_link_libraries(metar
|
||||
SimGearScene SimGearCore
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
|
||||
target_link_libraries(metar SimGearScene)
|
||||
install(TARGETS metar RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <simgear/timing/sg_time.hxx>
|
||||
#include <simgear/misc/sg_dir.hxx>
|
||||
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
#include <cmath> // rint()
|
||||
#include <cstdio>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <Network/DNSClient.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "MPServerResolver.hxx"
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
# include <config.h>
|
||||
|
||||
#include "fgcom.hxx"
|
||||
|
||||
|
@ -39,7 +37,7 @@
|
|||
#include <Airports/airport.hxx>
|
||||
#include <Navaids/navlist.hxx>
|
||||
|
||||
#include <3rdparty/iaxclient/lib/iaxclient.h>
|
||||
#include <iaxclient.h>
|
||||
|
||||
|
||||
#define NUM_CALLS 4
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "FlightHistoryUriHandler.hxx"
|
||||
#include "SimpleDOM.hxx"
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
#include <Aircraft/FlightHistory.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <Main/globals.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
//#define MIRROR_DEBUG 1
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <Navaids/navrecord.hxx>
|
||||
#include <Airports/airport.hxx>
|
||||
#include <ATC/CommStation.hxx>
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
using std::string;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
|
||||
#include "PkgUriHandler.hxx"
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
#include <simgear/package/Root.hxx>
|
||||
#include <simgear/package/Catalog.hxx>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <Main/globals.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
namespace flightgear {
|
||||
namespace http {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <simgear/props/props.hxx>
|
||||
#include <simgear/structure/commands.hxx>
|
||||
#include <Main/globals.hxx>
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
|
||||
using std::string;
|
||||
|
|
|
@ -32,8 +32,9 @@
|
|||
#include "PropertyChangeObserver.hxx"
|
||||
#include <Main/fg_props.hxx>
|
||||
#include <Include/version.h>
|
||||
#include <3rdparty/mongoose/mongoose.h>
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
|
||||
#include <mongoose.h>
|
||||
#include <cJSON.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#define JSONPROPS_HXX_
|
||||
|
||||
#include <simgear/props/props.hxx>
|
||||
#include <3rdparty/cjson/cJSON.h>
|
||||
#include <cJSON.h>
|
||||
#include <string>
|
||||
|
||||
namespace flightgear {
|
||||
|
|
|
@ -10,8 +10,7 @@ set(SOURCES
|
|||
voice.cxx
|
||||
voiceplayer.cxx
|
||||
soundmanager.cxx
|
||||
VoiceSynthesizer.cxx
|
||||
flitevoice.cxx
|
||||
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
|
@ -29,3 +28,6 @@ set(HEADERS
|
|||
)
|
||||
|
||||
flightgear_component(Sound "${SOURCES}" "${HEADERS}")
|
||||
|
||||
add_library(fgvoicesynth OBJECT VoiceSynthesizer.cxx flitevoice.cxx)
|
||||
target_link_libraries(fgvoicesynth PRIVATE flightgear_flite_hts SimGearScene)
|
||||
|
|
|
@ -111,8 +111,7 @@ setup_fgfs_embedded_resources()
|
|||
# Sort the sources and headers for MSVC.
|
||||
setup_msvc_grouping()
|
||||
|
||||
# Additional search paths for includes.
|
||||
setup_fgfs_includes()
|
||||
|
||||
|
||||
# All sources and headers to be built into the test suite.
|
||||
get_property(FG_SOURCES GLOBAL PROPERTY FG_SOURCES)
|
||||
|
@ -147,6 +146,8 @@ endif(ENABLE_AUTOTESTING)
|
|||
|
||||
# Set up the target links.
|
||||
setup_fgfs_libraries(fgfs_test_suite)
|
||||
# Additional search paths for includes.
|
||||
setup_fgfs_includes(fgfs_test_suite)
|
||||
|
||||
target_compile_definitions(fgfs_test_suite PUBLIC BUILDING_TESTSUITE)
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
add_executable(demconvert demconvert.cxx )
|
||||
|
||||
target_link_libraries(demconvert
|
||||
SimGearScene SimGearCore
|
||||
${GDAL_LIBRARY}
|
||||
)
|
||||
target_link_libraries(demconvert SimGearScene SimGearCore)
|
||||
|
||||
install(TARGETS demconvert RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
|
|
@ -5,20 +5,21 @@ find_package(OpenAL REQUIRED)
|
|||
# Copy positions.txt content in const char* _positionsData[];
|
||||
file(READ utils/positions.txt POSITIONS_DATA)
|
||||
string(REGEX REPLACE "\n" "\"%
|
||||
\"" POSITIONS_DATA ${POSITIONS_DATA})
|
||||
\"" POSITIONS_DATA ${POSITIONS_DATA})
|
||||
string(REGEX REPLACE "%" "," POSITIONS_DATA ${POSITIONS_DATA})
|
||||
file(WRITE positions.hxx "const char* _positionsData[] = {
|
||||
\"")
|
||||
file(APPEND positions.hxx ${POSITIONS_DATA})
|
||||
file(APPEND positions.hxx "\"
|
||||
};")
|
||||
|
||||
set(out_file ${CMAKE_BINARY_DIR}/positions.hxx)
|
||||
|
||||
file(WRITE ${out_file} "const char* _positionsData[] = {\n\"")
|
||||
file(APPEND ${out_file} ${POSITIONS_DATA})
|
||||
file(APPEND ${out_file} "\"\n};")
|
||||
|
||||
if(MSVC)
|
||||
set(RESOURCE_FILE fgcom.rc)
|
||||
endif(MSVC)
|
||||
|
||||
set(SOURCES fgcom.cxx)
|
||||
set(HEADERS fgcom.hxx positions.hxx)
|
||||
set(SOURCES fgcom_external.cxx)
|
||||
set(HEADERS fgcom_external.hxx ${out_file})
|
||||
|
||||
add_executable(${name}
|
||||
${SOURCES}
|
||||
|
@ -28,8 +29,6 @@ add_executable(${name}
|
|||
|
||||
target_link_Libraries(${name}
|
||||
iaxclient_lib
|
||||
${OPENAL_LIBRARY}
|
||||
SimGearCore
|
||||
)
|
||||
SimGearCore)
|
||||
|
||||
install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <simgear/sg_inlines.h>
|
||||
#include <simgear/math/SGMath.hxx>
|
||||
|
@ -36,9 +34,9 @@
|
|||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/timing/timestamp.hxx>
|
||||
|
||||
#include <3rdparty/iaxclient/lib/iaxclient.h>
|
||||
#include <iaxclient.h>
|
||||
|
||||
#include "fgcom.hxx"
|
||||
#include "fgcom_external.hxx"
|
||||
#include "positions.hxx" // provides _positionsData[];
|
||||
|
||||
int _port = 16661;
|
|
@ -1,8 +1,5 @@
|
|||
add_executable(fgelev fgelev.cxx)
|
||||
|
||||
target_link_libraries(fgelev
|
||||
SimGearScene SimGearCore
|
||||
${GDAL_LIBRARY}
|
||||
)
|
||||
target_link_libraries(fgelev SimGearScene SimGearCore)
|
||||
|
||||
install(TARGETS fgelev RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
|
|
@ -81,7 +81,7 @@ target_link_libraries(fgpanel
|
|||
SimGearCore
|
||||
${PNG_LIBRARIES}
|
||||
${FREETYPE_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
OpenGL::GL
|
||||
${GLUT_LIBRARIES}
|
||||
${GLEW_LIBRARIES}
|
||||
)
|
||||
|
|
|
@ -47,9 +47,7 @@ if(X11_FOUND)
|
|||
endif()
|
||||
|
||||
target_link_libraries(fgviewer
|
||||
SimGearScene SimGearCore
|
||||
${OPENGL_LIBRARIES}
|
||||
SimGearScene SimGearCore OpenGL::GL
|
||||
${FGVIEWER_RTI_LIBRARIES}
|
||||
${GDAL_LIBRARY}
|
||||
)
|
||||
install(TARGETS fgviewer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
|
Loading…
Reference in a new issue