diff options
author | Henri Chain <henri.chain@enioka.com> | 2020-07-10 13:12:25 +0000 |
---|---|---|
committer | Henri Chain <henri.chain@enioka.com> | 2020-07-10 13:12:25 +0000 |
commit | 01f7fe8f78e72dcda6000c70fd8b1d5bfefc46f2 (patch) | |
tree | deec44ccabcbc9e22b090656b601e2d2ac635b37 /tests/CMakeLists.txt | |
parent | 0ae520199d0e0523f4f0aa847b7567d72ae9553d (diff) | |
download | extra-cmake-modules-01f7fe8f78e72dcda6000c70fd8b1d5bfefc46f2.tar.gz extra-cmake-modules-01f7fe8f78e72dcda6000c70fd8b1d5bfefc46f2.tar.bz2 |
Add ecm_generate_dbus_service_file
Summary:
It serves as a replacement for `kdbusaddons_generate_dbus_service_file`.
An application can be a DBus-activated service just fine without using KDBusAddons.
Moreover, this new module uses named arguments for future-proofing, and adds support for specifying a `SystemdService`.
It also cleans up the confusion on what the "path" is about: Rather than requiring to specify executable and path separately, we just extract the executable file name on Windows, if necessary.
Usage:
```
ecm_generate_dbus_service_file(NAME org.kde.kded5
EXECUTABLE ${KDE_INSTALL_FULL_BINDIR}/kded5
SYSTEMD_SERVICE plasma-kded)
```
Test Plan:
* Was able to generate a kded service file
* Was able to generate a kded service file with `SystemdUnit`
* Verified that it moaned when executable wasn't an absolute path
* Untested on Windwos
Reviewers: #frameworks, davidedmundson, kossebau, kfunk, habacker
Subscribers: kde-frameworks-devel, kde-buildsystem
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D29051
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e61d7aa4..866df5bb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -211,3 +211,11 @@ add_test_macro(ECMConfiguredInstallTest ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMConfiguredInstallTest/check_tree.cmake" ) +set(ECMGenerateDBusServiceFileTest_EXTRA_OPTIONS + --build-target install + --build-options + "-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/ECMGenerateDBusServiceFileTest/InstallDirectory" +) +add_test_macro(ECMGenerateDBusServiceFileTest + ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMGenerateDBusServiceFileTest/check_tree.cmake" +) |