Commit 223e3dcd authored by Daniel Agar's avatar Daniel Agar

cmake testing updates

parent f767cc3f
...@@ -180,21 +180,27 @@ include_directories( ...@@ -180,21 +180,27 @@ include_directories(
add_subdirectory(libs) add_subdirectory(libs)
add_subdirectory(src) add_subdirectory(src)
if(ANDROID) set(QGC_RESOURCES
add_library(QGroundControl SHARED)
else()
add_executable(QGroundControl
#HackAndroidFileDialog.qrc #HackAndroidFileDialog.qrc
HackFileDialog.qrc HackFileDialog.qrc
qgcresources.qrc qgcresources.qrc
qgroundcontrol.qrc qgroundcontrol.qrc
) )
if(BUILD_TESTING)
list(APPEND QGC_RESOURCES
UnitTest.qrc
)
endif() endif()
target_link_libraries(QGroundControl if(ANDROID)
PUBLIC add_library(QGroundControl SHARED ${QGC_RESOURCES})
qgc else()
) add_executable(QGroundControl ${QGC_RESOURCES}
)
endif()
target_link_libraries(QGroundControl PUBLIC qgc)
if(NOT QT_MKSPEC MATCHES "winrt") if(NOT QT_MKSPEC MATCHES "winrt")
target_link_libraries(QGroundControl target_link_libraries(QGroundControl
......
...@@ -23,3 +23,7 @@ target_link_libraries(Audio ...@@ -23,3 +23,7 @@ target_link_libraries(Audio
target_include_directories(Audio PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(Audio PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if(BUILD_TESTING)
add_qgc_test(AudioOutputTest)
endif()
...@@ -31,7 +31,6 @@ if(BUILD_TESTING) ...@@ -31,7 +31,6 @@ if(BUILD_TESTING)
add_subdirectory(qgcunittest) add_subdirectory(qgcunittest)
add_qgc_test(AudioOutputTest)
add_qgc_test(CameraCalcTest) add_qgc_test(CameraCalcTest)
add_qgc_test(CameraSectionTest) add_qgc_test(CameraSectionTest)
add_qgc_test(CorridorScanComplexItemTest) add_qgc_test(CorridorScanComplexItemTest)
...@@ -62,9 +61,6 @@ if(BUILD_TESTING) ...@@ -62,9 +61,6 @@ if(BUILD_TESTING)
add_qgc_test(TCPLinkTest) add_qgc_test(TCPLinkTest)
add_qgc_test(TransectStyleComplexItemTest) add_qgc_test(TransectStyleComplexItemTest)
list(APPEND QGC_RESOURCES
UnitTest.qrc
)
endif() endif()
add_library(qgc add_library(qgc
......
add_library(FirmwarePlugin add_library(FirmwarePlugin
CameraMetaData.cc
FirmwarePlugin.cc
FirmwarePluginManager.cc
APM/APMFirmwarePlugin.cc APM/APMFirmwarePlugin.cc
APM/APMFirmwarePluginFactory.cc APM/APMFirmwarePluginFactory.cc
APM/APMParameterMetaData.cc APM/APMParameterMetaData.cc
...@@ -7,27 +11,21 @@ add_library(FirmwarePlugin ...@@ -7,27 +11,21 @@ add_library(FirmwarePlugin
APM/ArduPlaneFirmwarePlugin.cc APM/ArduPlaneFirmwarePlugin.cc
APM/ArduRoverFirmwarePlugin.cc APM/ArduRoverFirmwarePlugin.cc
APM/ArduSubFirmwarePlugin.cc APM/ArduSubFirmwarePlugin.cc
APM/APMResources.qrc
CameraMetaData.cc
FirmwarePlugin.cc
FirmwarePluginManager.cc
PX4/PX4FirmwarePlugin.cc PX4/PX4FirmwarePlugin.cc
PX4/PX4FirmwarePluginFactory.cc PX4/PX4FirmwarePluginFactory.cc
PX4/PX4ParameterMetaData.cc PX4/PX4ParameterMetaData.cc
# Resources
APM/APMResources.qrc
PX4/PX4Resources.qrc PX4/PX4Resources.qrc
) )
target_link_libraries(FirmwarePlugin target_link_libraries(FirmwarePlugin
PUBLIC PRIVATE
qgc qgc
) )
target_include_directories(FirmwarePlugin target_include_directories(FirmwarePlugin
PUBLIC INTERFACE
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
APM APM
) )
......
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