From 1b8d560649f898bdd38bdbbe9307ccc7fa86aaf6 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Sat, 12 Sep 2020 09:42:35 +0000 Subject: [PATCH] CMake: Set IMPORTED_IMPLIB property Setting this property allows to fix linking to the imported target with MinGW. This only happens when dbus is built using autotools, when cmake is used the DBus1Config.variant.in is configured and the automatically exported target by cmake is fine. --- cmake/DBus1Config.pkgconfig.in | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/DBus1Config.pkgconfig.in b/cmake/DBus1Config.pkgconfig.in index 8c0a25e4..93c593e1 100644 --- a/cmake/DBus1Config.pkgconfig.in +++ b/cmake/DBus1Config.pkgconfig.in @@ -71,5 +71,6 @@ set(DBus1_INCLUDE_DIRS "${DBus1_INCLUDE_DIR}" "${DBus1_ARCH_INCLUDE_DIR}") # setup imported target add_library(dbus-1 SHARED IMPORTED) set_property(TARGET dbus-1 APPEND PROPERTY IMPORTED_LOCATION ${DBus1_LIBRARY}) +set_property(TARGET dbus-1 APPEND PROPERTY IMPORTED_IMPLIB ${DBus1_LIBRARY}) set_property(TARGET dbus-1 APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${DBus1_INCLUDE_DIRS}) set_property(TARGET dbus-1 APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS ${DBus1_DEFINITIONS})