summaryrefslogtreecommitdiffstats
path: root/src/entrypoint
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-11-02 08:52:34 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-11-02 18:33:52 +0100
commit67dadc7e3428169778102a6dfab47e2e48c8d17e (patch)
tree4051352200eadb7d5a3229bf7543cbbf47bd163f /src/entrypoint
parent62c2d990f90ec999de694c5ccf7c7e14d8965052 (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 Pick-to: 6.2 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>
Diffstat (limited to 'src/entrypoint')
-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()