summaryrefslogtreecommitdiffstats
path: root/cmake/QtPostProcess.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-05-03 15:21:30 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-05-03 13:51:13 +0000
commita907d7df3488764b74afd219e1ddd368062529d6 (patch)
treecf4491e4bc166f90db3cda4cac8d379dd022169b /cmake/QtPostProcess.cmake
parentaef11e420db95a5dd42faa314f9afe69e890ee8d (diff)
Handle generating find_dependency() calls for nolink targets
Previously we just recorded that Gui has to link against Vulkan::Vulkan_nolink, but if an application consumed Gui, it wouldn't find that target. We need to record that if a module links against Vulkan_nolink, and then generate a find_dependency(Vulkan) call in the module config file. We also have to assign the _nolink interface library to an export (the Qt5 one), so that it gets installed as a target. Change-Id: Icbc29ff4161ab18fdd162196ae128e29c1ee8c80 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPostProcess.cmake')
-rw-r--r--cmake/QtPostProcess.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
index 57d194c037..fe6d70985b 100644
--- a/cmake/QtPostProcess.cmake
+++ b/cmake/QtPostProcess.cmake
@@ -58,6 +58,14 @@ function(qt_internal_create_depends_files)
foreach(dep ${${depends_var}})
# Gather third party packages that should be found when using the Qt module.
+ # Also handle nolink target dependencies.
+ string(REGEX REPLACE "_nolink$" "" base_dep "${dep}")
+ if(NOT base_dep STREQUAL dep)
+ # Resets target name like Vulkan_nolink to Vulkan, because we need to call
+ # find_package(Vulkan).
+ set(dep ${base_dep})
+ endif()
+
if(TARGET ${dep})
list(FIND third_party_deps_seen ${dep} dep_seen)