From 6e1e8a8bdc1a8a1b9894792cc3e3664065dfda39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Thu, 12 Oct 2023 16:26:39 +0200 Subject: [PATCH] libcloudproviders: Use DEFINE_VARIABLES to install in the correct directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conditionnaly require CMake 3.28 to install in the right directory. Signed-off-by: Corentin Noël --- shell_integration/libcloudproviders/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell_integration/libcloudproviders/CMakeLists.txt b/shell_integration/libcloudproviders/CMakeLists.txt index 0e71670a881cc..b4434d0408aa7 100644 --- a/shell_integration/libcloudproviders/CMakeLists.txt +++ b/shell_integration/libcloudproviders/CMakeLists.txt @@ -1,5 +1,9 @@ macro(dbus_add_activation_service _sources) +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.28.0") + pkg_get_variable(_install_dir dbus-1 session_bus_services_dir DEFINE_VARIABLES datadir=${CMAKE_INSTALL_DATADIR}) +else() pkg_get_variable(_install_dir dbus-1 session_bus_services_dir) +endif() foreach (_i ${_sources}) get_filename_component(_service_file ${_i} ABSOLUTE) string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i})