Browse Source

CMake: Adding option to install files in install target

Don't know how safe things work when it is applied, therefore adding an option to turn it on manually.

Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com>
QGC4.4
Thomas Karl Pietrowski 4 years ago committed by Patrick José Pereira
parent
commit
8e400ebafa
  1. 22
      CMakeLists.txt

22
CMakeLists.txt

@ -186,6 +186,28 @@ endif()
target_link_libraries(QGroundControl PRIVATE qgc) target_link_libraries(QGroundControl PRIVATE qgc)
option(ENABLE_INSTALL_TARGET "Enable real installation of QGC when running install" OFF)
if(ENABLE_INSTALL_TARGET)
include(GNUInstallDirs)
install(
TARGETS QGroundControl
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/resources/
DESTINATION ${CMAKE_INSTALL_DATADIR}/qgroundcontrol
)
install(
FILES ${CMAKE_SOURCE_DIR}/deploy/qgroundcontrol.desktop
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
)
install(
FILES ${CMAKE_SOURCE_DIR}/resources/icons/qgroundcontrol.png
DESTINATION ${CMAKE_INSTALL_DATADIR}/pixmaps/
)
endif()
if(BUILD_TESTING) if(BUILD_TESTING)
target_link_libraries(QGroundControl PRIVATE Qt5::Test) target_link_libraries(QGroundControl PRIVATE Qt5::Test)
endif() endif()

Loading…
Cancel
Save