diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2020-05-18 12:47:51 +0200 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2020-06-10 18:13:47 +0000 |
commit | 927a5f4d757e9eacb6f133ebd45b69db01e9e2f3 (patch) | |
tree | 7b022f56b45be246fc4e6333322134f082d2a39b /bus | |
parent | 97bdefd4e2598e6ea72337acb4230928594bda81 (diff) | |
download | dbus-927a5f4d757e9eacb6f133ebd45b69db01e9e2f3.tar.gz |
cmake: add support for user session semantic on Linux operating systems
Systemd user support is controlled by the cmake variable ENABLE_USER_SESSION,
which and WITH_SYSTEMD_USERUNITDIR to specify a custom installation
location. If WITH_SYSTEMD_USERUNITDIR is not specified, the related install
path is determined from an installed systemd package, if present.
This was added to the Autotools build system as part of fd.o#61301,
but until now was not possible to enable when building with CMake.
Diffstat (limited to 'bus')
-rw-r--r-- | bus/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bus/CMakeLists.txt b/bus/CMakeLists.txt index 2aa6068d..09503966 100644 --- a/bus/CMakeLists.txt +++ b/bus/CMakeLists.txt @@ -176,6 +176,13 @@ if(DBUS_BUS_ENABLE_SYSTEMD) add_systemd_service(${CMAKE_CURRENT_BINARY_DIR}/dbus.service PATH ${DBUS_SYSTEMD_SYSTEMUNITDIR} LINKS multi-user.target.wants) endif() +if(DBUS_ENABLE_USER_SESSION) + configure_file(systemd-user/dbus.socket.in ${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.socket) + configure_file(systemd-user/dbus.service.in ${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.service) + add_systemd_service(${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.socket PATH ${DBUS_SYSTEMD_USERUNITDIR} LINKS sockets.target.wants) + add_systemd_service(${CMAKE_CURRENT_BINARY_DIR}/systemd-user/dbus.service PATH ${DBUS_SYSTEMD_USERUNITDIR}) +endif() + ## mop up the gcov files #clean-local: # /bin/rm *.bb *.bbg *.da *.gcov || true |