Commit 7e11e615 authored by Daniel Agar's avatar Daniel Agar

cmake cleanup dependency handling

parent 760006ea
......@@ -204,7 +204,7 @@ else()
add_executable(QGroundControl ${QGC_RESOURCES})
endif()
target_link_libraries(QGroundControl PUBLIC qgc)
target_link_libraries(QGroundControl PRIVATE qgc)
if(NOT QT_MKSPEC MATCHES "winrt")
target_link_libraries(QGroundControl
......
......@@ -17,14 +17,15 @@ add_library(AnalyzeView
)
target_link_libraries(AnalyzeView
PRIVATE
qgc
PUBLIC
Qt5::Location
Qt5::SerialPort
Qt5::TextToSpeech
Qt5::Widgets
qgc
)
target_include_directories(AnalyzeView PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(AnalyzeView INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -12,13 +12,13 @@ add_library(Audio
)
target_link_libraries(Audio
PRIVATE
qgc
PUBLIC
Qt5::Core
Qt5::Qml
Qt5::TextToSpeech
Qt5::Widgets
qgc
)
target_include_directories(Audio PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
......
......@@ -27,6 +27,8 @@ add_library(AutoPilotPlugins
Common/SyslinkComponent.cc
Common/SyslinkComponentController.cc
Generic/GenericAutoPilotPlugin.cc
PX4/AirframeComponent.cc
PX4/AirframeComponentAirframes.cc
PX4/AirframeComponentController.cc
......@@ -45,19 +47,18 @@ add_library(AutoPilotPlugins
PX4/SensorsComponentController.cc
AutoPilotPlugin.cc
Generic/GenericAutoPilotPlugin.cc
)
target_link_libraries(AutoPilotPlugins
PUBLIC
PRIVATE
qgc
)
target_include_directories(AutoPilotPlugins
PUBLIC
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC
APM
Common
PX4
)
......@@ -73,6 +73,7 @@ add_library(qgc
JsonHelper.cc
KMLFileHelper.cc
LogCompressor.cc
main.cc
QGC.cc
QGCApplication.cc
QGCComboBox.cc
......@@ -91,7 +92,6 @@ add_library(qgc
RunGuard.cc
TerrainTile.cc
UTM.cpp
main.cc
# UI
QGCQmlWidgetHolder.ui
......@@ -100,8 +100,6 @@ add_library(qgc
set_source_files_properties(QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS GIT_VERSION="${git_tag}")
add_subdirectory(ui)
add_subdirectory(Airmap)
add_subdirectory(AnalyzeView)
add_subdirectory(api)
......@@ -123,29 +121,18 @@ add_subdirectory(QtLocationPlugin)
add_subdirectory(Settings)
add_subdirectory(Terrain)
add_subdirectory(uas)
add_subdirectory(ui)
add_subdirectory(Vehicle)
add_subdirectory(VehicleSetup)
add_subdirectory(VideoStreaming)
add_subdirectory(ViewWidgets)
target_link_libraries(qgc
PRIVATE
PUBLIC
Qt5::Bluetooth
Qt5::Concurrent
Qt5::Core
Qt5::Location
Qt5::Multimedia
Qt5::Positioning
Qt5::Quick
Qt5::QuickWidgets
Qt5::Sql
Qt5::Svg
Qt5::Test
Qt5::TextToSpeech
Qt5::Widgets
Qt5::Xml
Airmap
AnalyzeView
......@@ -165,7 +152,6 @@ target_link_libraries(qgc
PositionManager
QmlControls
QtLocationPlugin
qwt # LinechartWidget
Settings
Terrain
uas
......@@ -181,4 +167,3 @@ if(BUILD_TESTING)
endif()
target_include_directories(qgc INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -18,17 +18,18 @@ add_library(FactSystem
FactValueSliderListModel.cc
ParameterManager.cc
SettingsFact.cc
${EXTRA_SRC}
)
target_link_libraries(FactSystem
PUBLIC
PRIVATE
qgc
)
target_include_directories(FactSystem
PUBLIC
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC
FactControls
)
......@@ -4,7 +4,7 @@ add_library(FlightDisplay
)
target_link_libraries(FlightDisplay
PUBLIC
PRIVATE
qgc
)
......
......@@ -4,7 +4,7 @@ add_library(FlightMap
)
target_link_libraries(FlightMap
PUBLIC
PRIVATE
qgc
)
......
......@@ -66,13 +66,11 @@ add_library(MissionManager
target_link_libraries(MissionManager
PUBLIC
qgc
Qt5::Xml
PRIVATE
qgc
ui
)
target_include_directories(MissionManager
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(MissionManager INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -15,16 +15,17 @@ add_library(QmlControls
)
target_link_libraries(QmlControls
PRIVATE
qgc
FactSystem
PUBLIC
Qt5::Concurrent
Qt5::Location
Qt5::SerialPort
Qt5::TextToSpeech
Qt5::Widgets
qgc
FactSystem
)
target_include_directories(QmlControls PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(QmlControls INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -21,14 +21,13 @@ add_library(QtLocationPlugin
target_link_libraries(QtLocationPlugin
PUBLIC
Qt5::Location
Qt5::Sql
qgc
)
target_include_directories(QtLocationPlugin
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
QMLControl
)
......@@ -4,7 +4,7 @@ add_library(Terrain
)
target_link_libraries(Terrain
PUBLIC
PRIVATE
qgc
)
......
......@@ -20,5 +20,4 @@ target_link_libraries(Vehicle
qgc
)
target_include_directories(Vehicle PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(Vehicle INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -13,5 +13,4 @@ target_link_libraries(VehicleSetup
qgc
)
target_include_directories(VehicleSetup PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(VehicleSetup INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -33,7 +33,8 @@ add_library(VideoStreaming
target_link_libraries(VideoStreaming
PUBLIC
qgc
)
target_include_directories(VideoStreaming PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
Qt5::Multimedia
)
target_include_directories(VideoStreaming INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -10,5 +10,4 @@ target_link_libraries(ViewWidgets
qgc
)
target_include_directories(ViewWidgets PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(ViewWidgets INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -35,14 +35,15 @@ add_library(comm
)
target_link_libraries(comm
PRIVATE
qgc
PUBLIC
Qt5::Location
Qt5::SerialPort
Qt5::Test
Qt5::TextToSpeech
Qt5::Widgets
qgc
)
target_include_directories(comm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(comm INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -17,7 +17,7 @@ add_library(qgcunittest
)
target_link_libraries(qgcunittest
PUBLIC
PRIVATE
qgc
)
......
......@@ -11,9 +11,9 @@ add_library(uas
)
target_link_libraries(uas
PUBLIC
PRIVATE
qgc
)
target_include_directories(uas PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(uas INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -50,8 +50,9 @@ add_library(ui
)
target_link_libraries(ui
PUBLIC
PRIVATE
qgc
qwt
)
target_include_directories(ui
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment