From d8b6f37eb46813384a229fd3d9709f4745bd4fbc Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 25 Oct 2018 14:14:15 -0400 Subject: [PATCH] cmake create comm library in src/comm --- src/CMakeLists.txt | 26 ++-------------------- src/comm/CMakeLists.txt | 48 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 24 deletions(-) create mode 100644 src/comm/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2dcbd95b3..2c684ba62 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,7 +8,6 @@ include_directories( ${Qt5Location_PRIVATE_INCLUDE_DIRS} Camera - comm FactSystem FactSystem/FactControls FirmwarePlugin @@ -66,10 +65,6 @@ if(BUILD_TESTING) list(APPEND QGC_SRC - comm/MockLink.cc - comm/MockLinkFileServer.cc - comm/MockLinkMissionItemHandler.cc - FactSystem/FactSystemTestBase.cc FactSystem/FactSystemTestGeneric.cc FactSystem/FactSystemTestPX4.cc @@ -177,22 +172,6 @@ add_library(qgc Camera/QGCCameraIO.cc Camera/QGCCameraManager.cc - #src/comm/BluetoothLink.cc - comm/LinkConfiguration.cc - comm/LinkInterface.cc - comm/LinkManager.cc - comm/LogReplayLink.cc - comm/MavlinkMessagesTimer.cc - comm/MAVLinkProtocol.cc - comm/QGCFlightGearLink.cc - comm/QGCJSBSimLink.cc - comm/QGCMAVLink.cc - comm/QGCSerialPortInfo.cc - comm/QGCXPlaneLink.cc - comm/SerialLink.cc - comm/TCPLink.cc - comm/UDPLink.cc - FactSystem/Fact.cc FactSystem/FactControls/FactPanelController.cc FactSystem/FactGroup.cc @@ -321,9 +300,6 @@ add_library(qgc # HEADERS # shouldn't be listed here, but aren't named properly for AUTOMOC - comm/QGCFlightGearLink.h - comm/QGCHilLink.h - comm/QGCJSBSimLink.h QtLocationPlugin/QGCMapEngineData.h uas/UAS.h uas/UASInterface.h @@ -339,6 +315,7 @@ add_subdirectory(Airmap) add_subdirectory(api) add_subdirectory(Audio) add_subdirectory(AutoPilotPlugins) +add_subdirectory(comm) add_subdirectory(GPS) add_subdirectory(MissionManager) @@ -367,6 +344,7 @@ target_link_libraries(qgc api Audio AutoPilotPlugins + comm gps qwt # LinechartWidget MissionManager diff --git a/src/comm/CMakeLists.txt b/src/comm/CMakeLists.txt new file mode 100644 index 000000000..cad538613 --- /dev/null +++ b/src/comm/CMakeLists.txt @@ -0,0 +1,48 @@ + +set(EXTRA_SRC) +if(BUILD_TESTING) + list(APPEND EXTRA_SRC + MockLink.cc + MockLinkFileServer.cc + MockLinkMissionItemHandler.cc + ) +endif() + +add_library(comm + #BluetoothLink.cc + LinkConfiguration.cc + LinkInterface.cc + LinkManager.cc + LogReplayLink.cc + MavlinkMessagesTimer.cc + MAVLinkProtocol.cc + QGCFlightGearLink.cc + QGCJSBSimLink.cc + QGCMAVLink.cc + QGCSerialPortInfo.cc + QGCXPlaneLink.cc + SerialLink.cc + TCPLink.cc + UDPLink.cc + + ${EXTRA_SRC} + + # HEADERS + # shouldn't be listed here, but aren't named properly for AUTOMOC + QGCFlightGearLink.h + QGCHilLink.h + QGCJSBSimLink.h +) + +target_link_libraries(comm + PUBLIC + Qt5::Location + Qt5::SerialPort + Qt5::TextToSpeech + Qt5::Widgets + + qgc +) + +target_include_directories(comm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + -- 2.22.0