File 0001-cmake-In-client-configuration-file-get-DBus1_xxx-var.patch of Package mingw32-dbus-1
From 6065b55062e3fd7eed520ea5bc2332b9914484b3 Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Mon, 1 Nov 2021 13:01:59 +0100
Subject: [PATCH 1/3] cmake: In client configuration file get DBus1_xxx
variable from cmake target
In the generated cmake support file the values for
the DBus1_xxx variables are now fetched from the
related cmake target. This allows cmake to construct
the resulting relocatable runtime paths.
---
cmake/DBus1Config.cmake.in | 5 +++--
dbus/CMakeLists.txt | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/cmake/DBus1Config.cmake.in b/cmake/DBus1Config.cmake.in
index 1775b939..e8d9bc34 100644
--- a/cmake/DBus1Config.cmake.in
+++ b/cmake/DBus1Config.cmake.in
@@ -26,9 +26,10 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/DBus1Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/DBus1Targets.cmake")
endif()
- set(DBus1_DEFINITIONS)
+ # for compatibility, get settings from cmake target
+ get_target_property(DBus1_DEFINITIONS dbus-1 INTERFACE_COMPILE_DEFINITIONS)
get_target_property(DBus1_INCLUDE_DIRS dbus-1 INTERFACE_INCLUDE_DIRECTORIES)
- set(DBus1_LIBRARY dbus-1)
+ get_target_property(DBus1_LIBRARY dbus-1 IMPORTED_IMPLIB)
else()
message(FATAL_ERROR "Incomplete cmake support in DBus1 find_package configuration")
endif()
diff --git a/dbus/CMakeLists.txt b/dbus/CMakeLists.txt
index 1f545ba6..e034eee4 100644
--- a/dbus/CMakeLists.txt
+++ b/dbus/CMakeLists.txt
@@ -300,6 +300,7 @@ else(WIN32)
endif()
target_include_directories(dbus-1 INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/dbus-1.0>;$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}/dbus-1.0/include>)
+target_compile_definitions(dbus-1 INTERFACE "")
# Assume that Linux has -Wl,--version-script and other platforms do not
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
--
2.35.3