From af329b794f7215a4bc0081ac6514b5c681ba4801 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Mon, 8 Mar 2021 16:15:51 +0100 Subject: [PATCH] Use the find_dependency option to parse Simgear dependencies to FlightGear --- CMakeLists.txt | 18 ++++++------------ src/Main/CMakeLists.txt | 4 ---- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25e1f18f9..f1f3fa21d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,6 @@ 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}) -option(ENABLE_CYCLONE "Set to ON to build FlightGear with Cyclone Data Distribution Service support" ON) option(ENABLE_RTI "Set to ON to build FlightGear with RTI 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) @@ -352,17 +351,12 @@ find_package(SimGear ${MIN_SIMGEAR_VERSION} CONFIG REQUIRED) ############################################################################## -if(ENABLE_CYCLONE) - if (NOT TARGET CycloneDDS::ddsc) - find_package(CycloneDDS QUIET) - endif() - if (CycloneDDS_FOUND) - message(STATUS "Data Distribution Service support: CycloneDDS") - set(FG_HAVE_DDS 1) - else(CycloneDDS_FOUND) - message(STATUS "Data Distribution Service support: DISBLED") - endif(CycloneDDS_FOUND) -endif(ENABLE_CYCLONE) +if (SG_HAVE_DDS) + message(STATUS "Data Distribution Service support: CycloneDDS") + set(FG_HAVE_DDS 1) +else() + message(STATUS "Data Distribution Service support: DISBLED") +endif() if(ENABLE_RTI) message(STATUS "RTI: ENABLED") diff --git a/src/Main/CMakeLists.txt b/src/Main/CMakeLists.txt index 855e44244..3f0c9d2ea 100644 --- a/src/Main/CMakeLists.txt +++ b/src/Main/CMakeLists.txt @@ -108,10 +108,6 @@ else() install(TARGETS fgfs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() -if (CycloneDDS_FOUND) - target_link_libraries(fgfs CycloneDDS::ddsc) -endif(CycloneDDS_FOUND) - if (TARGET sentry::sentry) target_link_libraries(fgfs sentry::sentry) endif()