Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ set(SOURCES
src/uas/LogDownloadDialog.cc
src/uas/LogDownloadDialog.h
src/uas/LogDownloadDialog.ui
src/uas/MAVFTPFileFormats.cc
src/uas/MAVFTPFileFormats.h
src/uas/MAVFTPManager.cc
src/uas/MAVFTPManager.h
src/uas/MAVFTPProtocol.cc
src/uas/MAVFTPProtocol.h
src/uas/PxQuadMAV.cc
src/uas/PxQuadMAV.h
src/uas/QGCMAVLinkUASFactory.cc
Expand Down Expand Up @@ -785,6 +791,31 @@ target_compile_definitions(apmplanner2 PRIVATE
NOMINMAX
)

option(BUILD_MAVFTP_TESTS "Build MAVFTP unit tests" ON)
if(BUILD_MAVFTP_TESTS)
enable_testing()
add_executable(mavftp_unit_tests
tests/mavftp/MAVFTPUnitTest.cc
src/uas/MAVFTPFileFormats.cc
src/uas/MAVFTPFileFormats.h
src/uas/MAVFTPProtocol.cc
src/uas/MAVFTPProtocol.h
)
target_include_directories(mavftp_unit_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/comm
${CMAKE_CURRENT_SOURCE_DIR}/src/uas
${MAVLINKPATH}
${MAVLINKPATH}/${MAVLINK_CONF}
)
target_compile_definitions(mavftp_unit_tests PRIVATE
QGC_USE_${MAVLINK_CONF}_MESSAGES
)
target_link_libraries(mavftp_unit_tests
Qt5::Test
)
add_test(NAME mavftp_unit_tests COMMAND mavftp_unit_tests)
endif()

# Platform-specific properties and post-build
if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE "icons.icns")
Expand Down
6 changes: 6 additions & 0 deletions apm_planner.pro
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ HEADERS += \
src/QGCCore.h \
src/uas/UASInterface.h \
src/uas/UAS.h \
src/uas/MAVFTPFileFormats.h \
src/uas/MAVFTPManager.h \
src/uas/MAVFTPProtocol.h \
src/uas/UASManager.h \
src/comm/LinkManager.h \
src/comm/LinkInterface.h \
Expand Down Expand Up @@ -709,6 +712,9 @@ SOURCES += src/main.cc \
src/QGCCore.cc \
src/uas/UASManager.cc \
src/uas/UAS.cc \
src/uas/MAVFTPFileFormats.cc \
src/uas/MAVFTPManager.cc \
src/uas/MAVFTPProtocol.cc \
src/comm/LinkManager.cc \
src/comm/LinkInterface.cpp \
src/comm/QGCFlightGearLink.cc \
Expand Down
Loading