From 8eaa3206e9b00517695464ecb29b0a6defde88d9 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 24 Oct 2018 21:34:47 -0400 Subject: [PATCH] cmake create Airmap and AirspaceManagement libraries --- src/Airmap/CMakeLists.txt | 37 +++++++++++++++++++++++++ src/AirspaceManagement/CMakeLists.txt | 14 ++++++++++ src/CMakeLists.txt | 39 ++++----------------------- 3 files changed, 56 insertions(+), 34 deletions(-) create mode 100644 src/Airmap/CMakeLists.txt create mode 100644 src/AirspaceManagement/CMakeLists.txt diff --git a/src/Airmap/CMakeLists.txt b/src/Airmap/CMakeLists.txt new file mode 100644 index 000000000..9fd61a8da --- /dev/null +++ b/src/Airmap/CMakeLists.txt @@ -0,0 +1,37 @@ + +if(QGC_AIRMAP) + + add_library(Airmap + AirMapAdvisoryManager.cc + AirMapFlightManager.cc + AirMapFlightPlanManager.cc + AirMapManager.cc + AirMapRestrictionManager.cc + AirMapRulesetsManager.cc + AirMapSettings.cc + AirMapSharedState.cc + AirMapTelemetry.cc + AirMapTrafficMonitor.cc + AirMapVehicleManager.cc + AirMapWeatherInfoManager.cc + + airmap.qrc + ) +else() + add_library(Airmap + dummy/AirspaceManager.cc + airmap.qrc + ) + target_include_directories(Airmap PUBLIC dummy) +endif() + +target_link_libraries(Airmap + Qt5::Core + Qt5::Location + Qt5::Widgets + + qgc +) + +target_include_directories(AnalyzeView INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + diff --git a/src/AirspaceManagement/CMakeLists.txt b/src/AirspaceManagement/CMakeLists.txt new file mode 100644 index 000000000..306abee63 --- /dev/null +++ b/src/AirspaceManagement/CMakeLists.txt @@ -0,0 +1,14 @@ + +if(QGC_AIRMAP) + add_library(AirspaceManagement + AirspaceManagement/AirspaceAdvisoryProvider.cc + AirspaceManagement/AirspaceFlightPlanProvider.cc + AirspaceManagement/AirspaceManager.cc + AirspaceManagement/AirspaceRestriction.cc + AirspaceManagement/AirspaceRestrictionProvider.cc + AirspaceManagement/AirspaceRulesetsProvider.cc + AirspaceManagement/AirspaceVehicleManager.cc + AirspaceManagement/AirspaceWeatherInfoProvider.cc + ) +endif() + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2317bf2ad..26e3b1a25 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,38 +42,6 @@ include_directories( set(EXTRA_SRC) -if(QGC_AIRMAP) - - list(APPEND EXTRA_SRC - Airmap/AirMapAdvisoryManager.cc - Airmap/AirMapFlightManager.cc - Airmap/AirMapFlightPlanManager.cc - Airmap/AirMapManager.cc - Airmap/AirMapRestrictionManager.cc - Airmap/AirMapRulesetsManager.cc - Airmap/AirMapSettings.cc - Airmap/AirMapSharedState.cc - Airmap/AirMapTelemetry.cc - Airmap/AirMapTrafficMonitor.cc - Airmap/AirMapVehicleManager.cc - Airmap/AirMapWeatherInfoManager.cc - - AirspaceManagement/AirspaceAdvisoryProvider.cc - AirspaceManagement/AirspaceFlightPlanProvider.cc - AirspaceManagement/AirspaceManager.cc - AirspaceManagement/AirspaceRestriction.cc - AirspaceManagement/AirspaceRestrictionProvider.cc - AirspaceManagement/AirspaceRulesetsProvider.cc - AirspaceManagement/AirspaceVehicleManager.cc - AirspaceManagement/AirspaceWeatherInfoProvider.cc - ) -else() - list(APPEND EXTRA_SRC - Airmap/dummy/AirspaceManager.cc - ) - include_directories(Airmap/dummy) -endif() - if(MOBILE) list(APPEND EXTRA_SRC MobileScreenMgr.cc @@ -215,8 +183,6 @@ set(QGC_RESOURCES) list(APPEND QGC_RESOURCES FirmwarePlugin/APM/APMResources.qrc FirmwarePlugin/PX4/PX4Resources.qrc - - Airmap/airmap.qrc ) if(BUILD_TESTING) @@ -525,6 +491,9 @@ add_library(qgc set_source_files_properties(QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS GIT_VERSION="${git_tag}") target_link_libraries(qgc + + PUBLIC + Qt5::Bluetooth Qt5::Concurrent Qt5::Core @@ -540,6 +509,7 @@ target_link_libraries(qgc Qt5::Xml Qt5::Widgets + Airmap gps qwt # LinechartWidget ) @@ -547,5 +517,6 @@ target_link_libraries(qgc target_include_directories(qgc INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_subdirectory(AnalyzeView) +add_subdirectory(Airmap) add_subdirectory(GPS) -- 2.22.0