]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
CMake: Set IMPORTED_IMPLIB property
authorJulien Schueller <schueller@phimeca.com>
Sat, 12 Sep 2020 09:42:35 +0000 (09:42 +0000)
committerRalf Habacker <ralf.habacker@freenet.de>
Thu, 18 Nov 2021 13:20:08 +0000 (13:20 +0000)
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

index 8c0a25e4bace5a762c06c2d9b41ed39fb411233a..93c593e1c37b3636a01e62b38cdabecc149b077f 100644 (file)
@@ -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})