Commit db1ee7d6 authored by Daniel Agar's avatar Daniel Agar

cmake create qgcunittest library in src/qgcunittest

parent a669dfb7
......@@ -5,8 +5,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${Qt5Location_PRIVATE_INCLUDE_DIRS}
qgcunittest
)
set(EXTRA_SRC)
......@@ -43,23 +41,7 @@ if(BUILD_TESTING)
add_dependencies(check QGroundControl)
endfunction()
list(APPEND QGC_SRC
qgcunittest/FileDialogTest.cc
qgcunittest/FileManagerTest.cc
qgcunittest/FlightGearTest.cc
qgcunittest/GeoTest.cc
qgcunittest/LinkManagerTest.cc
qgcunittest/MainWindowTest.cc
qgcunittest/MavlinkLogTest.cc
qgcunittest/MessageBoxTest.cc
qgcunittest/MultiSignalSpy.cc
qgcunittest/RadioConfigTest.cc
qgcunittest/TCPLinkTest.cc
qgcunittest/TCPLoopBackServer.cc
qgcunittest/UnitTest.cc
qgcunittest/UnitTestList.cc
)
add_subdirectory(qgcunittest)
add_qgc_test(AudioOutputTest)
add_qgc_test(CameraCalcTest)
......@@ -214,5 +196,9 @@ target_link_libraries(qgc
ViewWidgets
)
if(BUILD_TESTING)
target_link_libraries(qgc PUBLIC qgcunittest)
endif()
target_include_directories(qgc INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
add_library(qgcunittest
FileDialogTest.cc
FileManagerTest.cc
FlightGearTest.cc
GeoTest.cc
LinkManagerTest.cc
MainWindowTest.cc
MavlinkLogTest.cc
MessageBoxTest.cc
MultiSignalSpy.cc
RadioConfigTest.cc
TCPLinkTest.cc
TCPLoopBackServer.cc
UnitTest.cc
UnitTestList.cc
)
target_link_libraries(qgcunittest
PUBLIC
qgc
)
target_include_directories(qgcunittest
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
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