diff options
| author | Henri Chain <[email protected]> | 2020-10-21 10:20:56 +0000 |
|---|---|---|
| committer | Henri Chain <[email protected]> | 2020-10-21 10:20:56 +0000 |
| commit | eb441b11885fc44dcba1bef693b95819657ed753 (patch) | |
| tree | 9aa35c9d5f0f483a2f5f43d95c9d04216426ded3 /CMakeLists.txt | |
| parent | 40cc911319da77489d1ffffb55969de66645ed53 (diff) | |
D-Bus activation systemd service
Correctly scopes dolphin in systemd service `app-org.kde.dolphin.service` when dbus-activated (while still working if systemd is not present), as per https://systemd.io/DESKTOP_ENVIRONMENTS/
uses new ECM modules:
- https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/5 to simplify the systemd service templating + install
- https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/17 to generate the dbus service file automatically
needs https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/25
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c1b1a7b84..7c969465c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE project(Dolphin VERSION ${RELEASE_SERVICE_VERSION}) set(QT_MIN_VERSION "5.14.0") -set(KF5_MIN_VERSION "5.73.0") +set(KF5_MIN_VERSION "5.75.0") # ECM setup find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED) @@ -16,6 +16,8 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) include(ECMSetupVersion) include(ECMGenerateHeaders) +include(ECMGenerateDBusServiceFile) +include(ECMConfiguredInstall) include(CMakePackageConfigHelpers) include(GenerateExportHeader) include(FeatureSummary) @@ -155,10 +157,16 @@ install(FILES COMPONENT Devel ) -configure_file(org.kde.dolphin.FileManager1.service.in - ${CMAKE_CURRENT_BINARY_DIR}/org.kde.dolphin.FileManager1.service) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.dolphin.FileManager1.service - DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) +ecm_generate_dbus_service_file( + NAME org.freedesktop.FileManager1 + EXECUTABLE "${KDE_INSTALL_FULL_BINDIR}/dolphin --daemon" + SYSTEMD_SERVICE plasma-dolphin.service + DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR} + RENAME org.kde.dolphin.FileManager1.service +) + +ecm_install_configured_files(INPUT plasma-dolphin.service.in DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR}) + install(FILES dolphin.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) |
