libcloudproviders: Use DEFINE_VARIABLES to install in the correct directory
authorCorentin Noël <corentin.noel@collabora.com>
Thu, 12 Oct 2023 14:26:39 +0000 (16:26 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Wed, 20 Mar 2024 11:28:38 +0000 (12:28 +0100)
Conditionnaly require CMake 3.28 to install in the right directory.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
shell_integration/libcloudproviders/CMakeLists.txt

index 0e71670a881cc6cf7f11eec496cf19264520e7fb..b4434d0408aa75c3a944784edbc517518469accf 100644 (file)
@@ -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})