From e3defc0adf68de74a735abae334739771838f191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Sat, 8 Jul 2023 21:43:33 +0200 Subject: [PATCH] qt: Ensure that we check the correct paths * lang/qt/src/QGpgmeConfig-w32.cmake.in.in, lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in: Get paths to check from the target properties. -- This avoids the error present in an older version where the files to check used the correct path, but a wrong path of the DLL was set in the target properties. --- lang/qt/src/QGpgmeConfig-w32.cmake.in.in | 6 +++++- lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lang/qt/src/QGpgmeConfig-w32.cmake.in.in b/lang/qt/src/QGpgmeConfig-w32.cmake.in.in index c1d894c6..fd750a40 100644 --- a/lang/qt/src/QGpgmeConfig-w32.cmake.in.in +++ b/lang/qt/src/QGpgmeConfig-w32.cmake.in.in @@ -67,9 +67,11 @@ set_target_properties(QGpgme PROPERTIES INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt5::Core" IMPORTED_LOCATION "@resolved_bindir@/libqgpgme-15.dll" ) +get_target_property(_libpath QGpgme IMPORTED_IMPLIB_RELEASE) +get_target_property(_dllpath QGpgme IMPORTED_LOCATION) list(APPEND _IMPORT_CHECK_TARGETS QGpgme ) -list(APPEND _IMPORT_CHECK_FILES_FOR_QGpgme "@resolved_libdir@/libqgpgme.dll.a" "@resolved_bindir@/libqgpgme-15.dll" ) +list(APPEND _IMPORT_CHECK_FILES_FOR_QGpgme "${_libpath}" "${_dllpath}" ) if(CMAKE_VERSION VERSION_LESS 2.8.12) message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") @@ -93,6 +95,8 @@ but not all the files it references. unset(_IMPORT_CHECK_FILES_FOR_${target}) endforeach() unset(_IMPORT_CHECK_TARGETS) +unset(_dllpath) +unset(_libpath) # This file does not depend on other imported targets which have # been exported from the same project but in a separate export set. diff --git a/lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in b/lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in index af0fa3eb..290f211f 100644 --- a/lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in +++ b/lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in @@ -67,9 +67,11 @@ set_target_properties(QGpgmeQt6 PROPERTIES INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt6::Core" IMPORTED_LOCATION "@resolved_bindir@/libqgpgmeqt6-15.dll" ) +get_target_property(_libpath QGpgmeQt6 IMPORTED_IMPLIB_RELEASE) +get_target_property(_dllpath QGpgmeQt6 IMPORTED_LOCATION) list(APPEND _IMPORT_CHECK_TARGETS QGpgmeQt6 ) -list(APPEND _IMPORT_CHECK_FILES_FOR_QGpgmeQt6 "@resolved_libdir@/libqgpgmeqt6.dll.a" "@resolved_bindir@/libqgpgmeqt6-15.dll" ) +list(APPEND _IMPORT_CHECK_FILES_FOR_QGpgmeQt6 "${_libpath}" "${_dllpath}" ) if(CMAKE_VERSION VERSION_LESS 2.8.12) message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") @@ -93,6 +95,8 @@ but not all the files it references. unset(_IMPORT_CHECK_FILES_FOR_${target}) endforeach() unset(_IMPORT_CHECK_TARGETS) +unset(_dllpath) +unset(_libpath) # This file does not depend on other imported targets which have # been exported from the same project but in a separate export set.