summaryrefslogtreecommitdiffstats
path: root/cmake/Qt3rdPartyLibraryHelpers.cmake
diff options
context:
space:
mode:
authorCristian Le <cristian.le@qt.io>2025-03-05 11:27:25 +0100
committerCristian Le <cristian.le@qt.io>2025-06-27 20:29:16 +0200
commit2f9795aba2f1f9ca5fbcca4581b2d89fc468cf07 (patch)
tree11bf3605e84fec3b4f32f4201a149ea1f8d429b2 /cmake/Qt3rdPartyLibraryHelpers.cmake
parent055985ec8373b8a1bd325468b5ba4f1c1de4eaed (diff)
Replace `QT_NO_CREATE_TARGETS` with an automated and scoped logic
Effectively check if we are importing while still building the current project Task-number: QTBUG-135233 Change-Id: If172617463157e84e1b16fc2354147fabae41084 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/Qt3rdPartyLibraryHelpers.cmake')
-rw-r--r--cmake/Qt3rdPartyLibraryHelpers.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/Qt3rdPartyLibraryHelpers.cmake b/cmake/Qt3rdPartyLibraryHelpers.cmake
index 33bfc3e8348..fb41ded3150 100644
--- a/cmake/Qt3rdPartyLibraryHelpers.cmake
+++ b/cmake/Qt3rdPartyLibraryHelpers.cmake
@@ -283,6 +283,17 @@ function(qt_internal_add_3rdparty_library target)
INSTALL_DESTINATION "${config_install_dir}"
)
+ qt_configure_file(
+ OUTPUT "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}TargetsPrecheck.cmake"
+ CONTENT
+"
+_qt_internal_should_include_targets(
+ TARGETS ${target}
+ NAMESPACE ${INSTALL_CMAKE_NAMESPACE}::
+ OUT_VAR_SHOULD_SKIP __qt_${target}_skip_include_targets_file
+)
+")
+
write_basic_package_version_file(
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigVersionImpl.cmake"
VERSION ${PROJECT_VERSION}
@@ -297,6 +308,7 @@ function(qt_internal_add_3rdparty_library target)
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}Config.cmake"
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigVersion.cmake"
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigVersionImpl.cmake"
+ "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}TargetsPrecheck.cmake"
DESTINATION "${config_install_dir}"
COMPONENT Devel
)