summaryrefslogtreecommitdiffstats
path: root/cmake/QtPluginDependencies.cmake.in
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-25 14:44:29 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-25 13:38:33 +0000
commit6290efc4ebbdf547e16f5728b8393d1e75a4ed89 (patch)
treee03beddec3f4e0aaa91f40a4b55840d51f259b1c /cmake/QtPluginDependencies.cmake.in
parente25f9e20081e83a2c98d4be436d2a79a5fdbbc83 (diff)
Fix building against an installed static Qt
For ICU we have multiple components, and ICU becomes a public dependency to QtCore. When storing the INTERFACE_QT_PACKAGE_COMPONENTS property, make sure to store the entire list of components, not just the first component -- by turning the semi-colon separated list into a space separated list. When processing the components at find_dependency time, we need to reverse that and pass COMPONENTS directly to ensure a correct parameter expansion. Change-Id: I24a0708520e7d5fba039395a151034aee4d4c0e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPluginDependencies.cmake.in')
-rw-r--r--cmake/QtPluginDependencies.cmake.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in
index b456db58c1..6ca392ec64 100644
--- a/cmake/QtPluginDependencies.cmake.in
+++ b/cmake/QtPluginDependencies.cmake.in
@@ -17,12 +17,13 @@ foreach(_target_dep ${_third_party_deps})
list(APPEND find_package_args "${version}")
endif()
- if(components)
- list(APPEND find_package_args "COMPONENTS" ${components})
- endif()
-
if (NOT ${pkg}_FOUND)
- find_dependency(${find_package_args})
+ if(components)
+ string(REPLACE " " ";" components "${components}")
+ find_dependency(${find_package_args} COMPONENTS ${components})
+ else()
+ find_dependency(${find_package_args})
+ endif()
endif()
if (NOT ${pkg}_FOUND)