summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2021-06-14 16:24:57 +0200
committerDominik Holland <dominik.holland@qt.io>2021-06-14 20:58:00 +0200
commitf380c87731472eb59495b7823b7c6243b3aa11f4 (patch)
tree205b9f8b797595e996dda96de5f1a997abc27e33 /cmake
parent6eea6e30c601a8864bfbb38fc063c536f243d991 (diff)
CMake: Add public FindPackageHelpers
This makes qt_internal_disable_find_package_global_promotion available, which is needed when linking against QtMultimedia in a static build Pick-to: 6.2 Change-Id: I9b8f6d7b74a8693ac471f8a280e893f4da80a44b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBaseGlobalTargets.cmake1
-rw-r--r--cmake/QtBuild.cmake1
-rw-r--r--cmake/QtConfig.cmake.in1
-rw-r--r--cmake/QtFindPackageHelpers.cmake4
-rw-r--r--cmake/QtPublicFindPackageHelpers.cmake3
5 files changed, 6 insertions, 4 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index 3b770e79ff..2d858d657f 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -255,6 +255,7 @@ set(__public_cmake_helpers
cmake/QtPublicPluginHelpers.cmake
cmake/QtPublicTargetHelpers.cmake
cmake/QtPublicWalkLibsHelpers.cmake
+ cmake/QtPublicFindPackageHelpers.cmake
)
qt_copy_or_install(FILES ${__public_cmake_helpers} DESTINATION "${__GlobalConfig_install_dir}")
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 792276e38f..028de66af7 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -551,6 +551,7 @@ endif()
include(QtPublicPluginHelpers)
include(QtPublicTargetHelpers)
include(QtPublicWalkLibsHelpers)
+include(QtPublicFindPackageHelpers)
# TODO: This block provides support for old variables. It should be removed once
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in
index 063128e3d6..19d619e7f1 100644
--- a/cmake/QtConfig.cmake.in
+++ b/cmake/QtConfig.cmake.in
@@ -59,6 +59,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/QtPublicFinalizerHelpers.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/QtPublicPluginHelpers.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/QtPublicTargetHelpers.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/QtPublicWalkLibsHelpers.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/QtPublicFindPackageHelpers.cmake")
# Find required dependencies, if any.
include(CMakeFindDependencyMacro)
diff --git a/cmake/QtFindPackageHelpers.cmake b/cmake/QtFindPackageHelpers.cmake
index 040fae0e27..a980652e60 100644
--- a/cmake/QtFindPackageHelpers.cmake
+++ b/cmake/QtFindPackageHelpers.cmake
@@ -299,7 +299,3 @@ function(qt_internal_should_not_promote_package_target_to_global target out_var)
get_property(should_not_promote TARGET "${target}" PROPERTY _qt_no_promote_global)
set("${out_var}" "${should_not_promote}" PARENT_SCOPE)
endfunction()
-
-function(qt_internal_disable_find_package_global_promotion target)
- set_target_properties("${target}" PROPERTIES _qt_no_promote_global TRUE)
-endfunction()
diff --git a/cmake/QtPublicFindPackageHelpers.cmake b/cmake/QtPublicFindPackageHelpers.cmake
new file mode 100644
index 0000000000..df42241c56
--- /dev/null
+++ b/cmake/QtPublicFindPackageHelpers.cmake
@@ -0,0 +1,3 @@
+function(qt_internal_disable_find_package_global_promotion target)
+ set_target_properties("${target}" PROPERTIES _qt_no_promote_global TRUE)
+endfunction()