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.
This commit is contained in:
Ingo Klöcker 2023-07-08 21:43:33 +02:00
parent be0e653ce3
commit e3defc0adf
No known key found for this signature in database
GPG Key ID: F5A5D1692277A1E9
2 changed files with 10 additions and 2 deletions

View File

@ -67,9 +67,11 @@ set_target_properties(QGpgme PROPERTIES
INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt5::Core" INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt5::Core"
IMPORTED_LOCATION "@resolved_bindir@/libqgpgme-15.dll" 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_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) if(CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") 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}) unset(_IMPORT_CHECK_FILES_FOR_${target})
endforeach() endforeach()
unset(_IMPORT_CHECK_TARGETS) unset(_IMPORT_CHECK_TARGETS)
unset(_dllpath)
unset(_libpath)
# This file does not depend on other imported targets which have # This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set. # been exported from the same project but in a separate export set.

View File

@ -67,9 +67,11 @@ set_target_properties(QGpgmeQt6 PROPERTIES
INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt6::Core" INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt6::Core"
IMPORTED_LOCATION "@resolved_bindir@/libqgpgmeqt6-15.dll" 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_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) if(CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") 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}) unset(_IMPORT_CHECK_FILES_FOR_${target})
endforeach() endforeach()
unset(_IMPORT_CHECK_TARGETS) unset(_IMPORT_CHECK_TARGETS)
unset(_dllpath)
unset(_libpath)
# This file does not depend on other imported targets which have # This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set. # been exported from the same project but in a separate export set.