summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuild.cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2019-06-04 12:02:14 +0200
committerCristian Adam <cristian.adam@qt.io>2019-06-04 10:12:27 +0000
commitfae5691c7f78f8a0154c9cea28b6639327a90550 (patch)
tree17951beb727f5446f62ff527cf2c79c2afe356b0 /cmake/QtBuild.cmake
parentbb52bd49e1917bee787c0d5c8a56e2734bb77710 (diff)
CMake: Allow build with MinGW and Hunter 3rd party packages
Hunter has recently added aliased target names that conform with upstream CMake find module target names. Extended the WrapFreetype to work with Hunter's freetype (lowercase) package name. Change-Id: I0e25f342c6930658f07f05d2e6a58cf94d2d168d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r--cmake/QtBuild.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 20b7c5bec8..591c752f77 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -2036,6 +2036,12 @@ macro(qt_find_package)
# all scopes.
foreach(qt_find_package_target_name ${arg_PROVIDED_TARGETS})
if(TARGET ${qt_find_package_target_name})
+ # Allow usage of aliased targets by setting properties on the actual target
+ get_target_property(aliased_target ${qt_find_package_target_name} ALIASED_TARGET)
+ if(aliased_target)
+ set(qt_find_package_target_name ${aliased_target})
+ endif()
+
set_target_properties(${qt_find_package_target_name}
PROPERTIES INTERFACE_QT_PACKAGE_NAME ${ARGV0})
if(package_version)