From b97df1599dba363e696a961add09baf1f7f049d7 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 24 Oct 2018 19:58:03 -0400 Subject: [PATCH] cmake create gps library in src/GPS --- CMakeLists.txt | 19 ++++++------------- src/CMakeLists.txt | 3 +++ src/GPS/CMakeLists.txt | 23 +++++++++++++++++++++++ 3 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 src/CMakeLists.txt create mode 100644 src/GPS/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 87327f241..1bde6ee11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -362,15 +362,6 @@ list(APPEND QGC_SRC src/FollowMe/FollowMe.cc - src/GPS/Drivers/src/ashtech.cpp - src/GPS/Drivers/src/gps_helper.cpp - src/GPS/Drivers/src/mtk.cpp - src/GPS/Drivers/src/rtcm.cpp - src/GPS/Drivers/src/ubx.cpp - src/GPS/GPSManager.cc - src/GPS/GPSProvider.cc - src/GPS/RTCM/RTCMMavlink.cc - src/Joystick/Joystick.cc src/Joystick/JoystickManager.cc src/Joystick/JoystickSDL.cc @@ -754,9 +745,6 @@ list(APPEND QGC_UI include_directories( src/QtLocationPlugin/QMLControl - #src/QtLocationPlugin/qtlocation/include/QtLocation - #src/QtLocationPlugin/qtlocation/include/QtLocation/5.5.1 - #src/QtLocationPlugin/qtlocation/include/QtPositioning/5.5.1 ${Qt5Location_PRIVATE_INCLUDE_DIRS} libs/eigen @@ -785,7 +773,6 @@ include_directories( src/FlightDisplay src/FlightMap/Widgets src/FollowMe - src/GPS src/Joystick src/MissionManager src/PositionManager @@ -803,6 +790,8 @@ include_directories( src/ViewWidgets ) +add_subdirectory(src) + if(ANDROID) add_library(QGroundControl SHARED ${QGC_SRC} ${QGC_RESOURCES} ${QGC_UI}) else() @@ -825,6 +814,10 @@ target_link_libraries(QGroundControl Qt5::Xml Qt5::Widgets ) + +target_link_libraries(QGroundControl + gps +) if(NOT QT_MKSPEC MATCHES "winrt") target_link_libraries(QGroundControl diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..e7fee3974 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,3 @@ + +add_subdirectory(GPS) + diff --git a/src/GPS/CMakeLists.txt b/src/GPS/CMakeLists.txt new file mode 100644 index 000000000..b015531fe --- /dev/null +++ b/src/GPS/CMakeLists.txt @@ -0,0 +1,23 @@ + + +add_library(gps + Drivers/src/ashtech.cpp + Drivers/src/gps_helper.cpp + Drivers/src/mtk.cpp + Drivers/src/rtcm.cpp + Drivers/src/ubx.cpp + GPSManager.cc + GPSProvider.cc + RTCM/RTCMMavlink.cc +) + +target_link_libraries(gps + Qt5::Core + Qt5::Location + Qt5::SerialPort + Qt5::Svg + Qt5::TextToSpeech +) + +target_include_directories(gps INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + -- 2.22.0