54 lines
1.4 KiB
CMake
54 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
# add source files
|
|
set(HEADER_FILES
|
|
)
|
|
set(SRC_FILES
|
|
main.cpp
|
|
)
|
|
|
|
# find c++utilities
|
|
find_package(c++utilities 3.3.0 REQUIRED)
|
|
use_cpp_utilities()
|
|
|
|
# find qtutilities
|
|
find_package(qtutilities 4.0.0 REQUIRED)
|
|
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
|
|
|
# need to link against the repoindex lib
|
|
list(APPEND LIBRARIES lib${META_PROJECT_NAME})
|
|
|
|
# include modules to apply configuration
|
|
include(BasicConfig)
|
|
include(QtGuiConfig)
|
|
include(QtConfig)
|
|
include(WindowsResources)
|
|
include(AppTarget)
|
|
include(ShellCompletion)
|
|
|
|
# add installs for service and config files
|
|
install(FILES ../resources/systemd/${META_PROJECT_NAME}.service
|
|
DESTINATION lib/systemd/system
|
|
COMPONENT service
|
|
)
|
|
|
|
install(FILES ../resources/settings/${META_PROJECT_NAME}.conf.js
|
|
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()
|