summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Xinwei <1326710505@qq.com>2021-08-10 21:19:53 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-10 19:34:15 +0000
commit4ba1faef68679cedecab64aaa78778fd660802b8 (patch)
treec8cca76619766ed659377b8c03006878e8d950ed
parent9c61387d3cadfc2ab7f2fb9cfb12ed82dafc0803 (diff)
Copy Find*.cmake to ${QT_BUILD_DIR}/lib/cmake/Qt6
In top-level builds, when configuring qtsensors, the directory of FindWMF.cmake isn't in ${CMAKE_MODULE_PATH}, this makes CMake couldn't find WMF. On Windows, QtMultimedia requires WMF. If WMF couldn't be found, QtMultimedia will also be treated as NOT FOUND. QtSensors has an optional dependency to QtMultimedia. If QtMultimedia couldn't be found, CMake will warn. Copy Find*.cmake to ${QT_BUILD_DIR}/lib/cmake/Qt6, to make sure these files could be found by CMake. Fixes: QTBUG-95655 Change-Id: I87d14c9a7becd0ec493e00c297b2e01fc0ad0f96 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1a8de144b64fe665d3c0b34e329c9454d97e1523) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 24790c7d65..f77f1bb8b0 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -451,6 +451,7 @@ macro(qt_build_repo_end)
# Install the repo-specific cmake find modules.
qt_path_join(__qt_repo_install_dir ${QT_CONFIG_INSTALL_DIR} ${INSTALL_CMAKE_NAMESPACE})
+ qt_path_join(__qt_repo_build_dir ${QT_CONFIG_BUILD_DIR} ${INSTALL_CMAKE_NAMESPACE})
if(NOT PROJECT_NAME STREQUAL "QtBase")
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@@ -458,6 +459,12 @@ macro(qt_build_repo_end)
DESTINATION "${__qt_repo_install_dir}"
FILES_MATCHING PATTERN "Find*.cmake"
)
+ if(QT_SUPERBUILD AND QT_WILL_INSTALL)
+ file(COPY cmake/
+ DESTINATION "${__qt_repo_build_dir}"
+ FILES_MATCHING PATTERN "Find*.cmake"
+ )
+ endif()
endif()
endif()