2016-04-25 22:30:11 +02:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
# add source files
|
|
|
|
set(HEADER_FILES
|
|
|
|
)
|
|
|
|
set(SRC_FILES
|
|
|
|
main.cpp
|
|
|
|
)
|
|
|
|
|
2016-09-17 12:59:33 +02:00
|
|
|
set(META_PROJECT_TYPE application)
|
|
|
|
|
2016-04-25 22:30:11 +02:00
|
|
|
# find c++utilities
|
2019-03-14 18:15:03 +01:00
|
|
|
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
|
2016-04-25 22:30:11 +02:00
|
|
|
use_cpp_utilities()
|
|
|
|
|
|
|
|
# find qtutilities
|
2019-06-10 15:39:56 +02:00
|
|
|
find_package(qtutilities${CONFIGURATION_PACKAGE_SUFFIX} 6.0.0 REQUIRED)
|
2016-04-25 22:30:11 +02:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
|
|
|
|
2017-01-22 20:47:14 +01:00
|
|
|
# find repoindex
|
|
|
|
find_package(librepoindex ${META_APP_VERSION} REQUIRED)
|
|
|
|
use_librepoindex()
|
|
|
|
|
|
|
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
2016-04-25 22:30:11 +02:00
|
|
|
|
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(QtGuiConfig)
|
|
|
|
include(QtConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(AppTarget)
|
2016-07-04 23:32:10 +02:00
|
|
|
include(ShellCompletion)
|
2016-09-17 12:59:33 +02:00
|
|
|
include(ConfigHeader)
|
2016-04-25 22:30:11 +02:00
|
|
|
|
|
|
|
# add installs for service and config files
|
2016-05-26 02:29:56 +02:00
|
|
|
install(FILES ../resources/systemd/${META_PROJECT_NAME}.service
|
2016-04-25 22:30:11 +02:00
|
|
|
DESTINATION lib/systemd/system
|
|
|
|
COMPONENT service
|
|
|
|
)
|
|
|
|
|
2016-05-26 02:29:56 +02:00
|
|
|
install(FILES ../resources/settings/${META_PROJECT_NAME}.conf.js
|
2016-04-25 22:30:11 +02:00
|
|
|
DESTINATION share/${META_PROJECT_NAME}/skel
|
|
|
|
COMPONENT config
|
|
|
|
)
|
|
|
|
|
|
|
|
# add install targets for service and config files
|
|
|
|
if(NOT TARGET install-service)
|
|
|
|
add_custom_target(install-service
|
|
|
|
DEPENDS ${META_PROJECT_NAME}
|
|
|
|
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=service -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT TARGET install-config)
|
|
|
|
add_custom_target(install-config
|
|
|
|
DEPENDS ${META_PROJECT_NAME}
|
|
|
|
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=config -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
|
|
|
)
|
|
|
|
endif()
|