2017-02-20 18:37:11 +01:00
|
|
|
# metadata
|
|
|
|
set(META_PROJECT_NAME syncthingfileitemaction)
|
|
|
|
set(META_APP_NAME "Syncthing KIO-Plugin")
|
|
|
|
set(META_APP_DESCRIPTION "KIO file item action for Syncthing")
|
|
|
|
set(META_PROJECT_TYPE qtplugin)
|
2018-04-01 23:02:14 +02:00
|
|
|
set(META_QT5_VERSION 5.8)
|
2017-02-20 18:37:11 +01:00
|
|
|
|
|
|
|
# add project files
|
2019-11-30 18:24:19 +01:00
|
|
|
set(HEADER_FILES syncthingmenuaction.h syncthinginfoaction.h syncthingdiractions.h syncthingfileitemactionstaticdata.h
|
|
|
|
syncthingfileitemaction.h)
|
|
|
|
set(SRC_FILES syncthingmenuaction.cpp syncthinginfoaction.cpp syncthingdiractions.cpp syncthingfileitemactionstaticdata.cpp
|
|
|
|
syncthingfileitemaction.cpp)
|
2017-02-20 18:37:11 +01:00
|
|
|
|
2019-09-08 18:12:05 +02:00
|
|
|
set(TS_FILES translations/${META_PROJECT_NAME}_cs_CZ.ts translations/${META_PROJECT_NAME}_de_DE.ts
|
|
|
|
translations/${META_PROJECT_NAME}_en_US.ts)
|
2017-02-26 18:59:37 +01:00
|
|
|
|
2017-02-20 18:37:11 +01:00
|
|
|
# find c++utilities
|
2019-03-13 19:12:23 +01:00
|
|
|
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
|
2017-02-20 18:37:11 +01:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CPP_UTILITIES_MODULE_DIRS})
|
|
|
|
|
|
|
|
# find qtutilities
|
2019-03-13 19:12:23 +01:00
|
|
|
find_package(qtutilities${CONFIGURATION_PACKAGE_SUFFIX} 6.0.0 REQUIRED)
|
2017-02-20 18:37:11 +01:00
|
|
|
use_qt_utilities()
|
|
|
|
|
|
|
|
# find backend libraries
|
|
|
|
find_package(syncthingconnector ${META_APP_VERSION} REQUIRED)
|
|
|
|
use_syncthingconnector()
|
|
|
|
find_package(syncthingmodel ${META_APP_VERSION} REQUIRED)
|
|
|
|
use_syncthingmodel()
|
|
|
|
|
2019-03-13 19:12:23 +01:00
|
|
|
# link also explicitely against the following Qt and KF modules
|
2017-02-20 18:37:11 +01:00
|
|
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
|
|
|
list(APPEND ADDITIONAL_KF_MODULES KIO)
|
2019-11-30 18:24:19 +01:00
|
|
|
set(KIO_MODULE_TARGETS KF5::KIOCore KF5::KIOFileWidgets KF5::KIOWidgets KF5::KIONTLM)
|
2017-02-20 18:37:11 +01:00
|
|
|
|
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(QtGuiConfig)
|
|
|
|
include(QtConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(LibraryTarget)
|
|
|
|
include(ConfigHeader)
|
2017-02-25 18:55:42 +01:00
|
|
|
|
2020-02-14 23:04:10 +01:00
|
|
|
# configure and install desktop file
|
|
|
|
include(TemplateFinder)
|
|
|
|
find_template_file("${META_PROJECT_NAME}.desktop" "${META_PROJECT_NAME}" DESKTOP_TEMPLATE_FILE)
|
|
|
|
set(DESKTOP_TARGET_FILE "${CMAKE_CURRENT_BINARY_DIR}/${META_TARGET_NAME}.desktop")
|
|
|
|
configure_file("${DESKTOP_TEMPLATE_FILE}" "${DESKTOP_TARGET_FILE}")
|
2020-02-18 20:46:57 +01:00
|
|
|
install(
|
|
|
|
FILES "${DESKTOP_TARGET_FILE}"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/kservices5"
|
|
|
|
COMPONENT desktop)
|