summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-11-02 08:52:34 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-11-02 17:34:04 +0000
commit9f762f610b03f74a888a652c96d435ecfa85703c (patch)
tree56e9aa8d6f6e9725521da4add3f4c08ae1f9b4e6 /src
parentc3a1cdde082aeedc2c8c009ef3d7a31c0e630f33 (diff)
CMake: Fix EntryPointMinGW32Target to be found in top-level build
The file needs to be copied into the top-level build config dir. Amends 753199437943e2a89e458136fd11a5a43443b280 Fixes: QTBUG-97919 Change-Id: I8e0b525cfbd89ce5c7b07b62bfc023a7f8650cb9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 67dadc7e3428169778102a6dfab47e2e48c8d17e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/entrypoint/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/entrypoint/CMakeLists.txt b/src/entrypoint/CMakeLists.txt
index 19c64cc34f..755f12c821 100644
--- a/src/entrypoint/CMakeLists.txt
+++ b/src/entrypoint/CMakeLists.txt
@@ -27,6 +27,12 @@ if(MINGW)
configure_file("EntryPointMinGW32Target.cmake.in" "${mingw32target_config_file}" @ONLY)
qt_copy_or_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${mingw32target_config_file}"
DESTINATION "${config_install_dir}")
+ # In prefix builds we also need to copy the file into the build config directory, so that the
+ # build-dir Qt6Config.cmake finds the files when building other repos in a top-level build.
+ if(QT_WILL_INSTALL)
+ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/${mingw32target_config_file}"
+ DESTINATION "${config_install_dir}")
+ endif()
include("${CMAKE_CURRENT_BINARY_DIR}/${mingw32target_config_file}")
set(extra_cmake_includes_arg EXTRA_CMAKE_INCLUDES "${mingw32target_config_file}")
endif()