summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-08-18 11:19:51 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-08-18 22:15:35 +0200
commit175e81ffbdc5d41fa58b24a5447be9219ea755da (patch)
treef4fa6b3c0be39cdc781657f1a7ce515e18739648 /src
parent213755a86622ae8b3ed3d7ad34a6aecd051b2b03 (diff)
CMake: Fix wasm top-level prefix builds
The wasm support files need to be both copied and installed in a top-level prefix build, to ensure that leaf repos can find them in the build dir when they are configured. Pick-to: 6.2 Fixes: QTBUG-95806 Change-Id: I8c09f04fec51cf850299d535bdf3f26542ec4aac Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/wasm/CMakeLists.txt19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/plugins/platforms/wasm/CMakeLists.txt b/src/plugins/platforms/wasm/CMakeLists.txt
index 636193141c..00f86b837c 100644
--- a/src/plugins/platforms/wasm/CMakeLists.txt
+++ b/src/plugins/platforms/wasm/CMakeLists.txt
@@ -62,15 +62,20 @@ qt_internal_extend_target(QWasmIntegrationPlugin CONDITION QT_FEATURE_opengl
#### Keys ignored in scope 4:.:.:wasm.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
-qt_copy_or_install(FILES
+set(wasm_support_files
wasm_shell.html
- DESTINATION "${CMAKE_INSTALL_PREFIX}/plugins/platforms/"
-)
-qt_copy_or_install(FILES
qtloader.js
- DESTINATION "${CMAKE_INSTALL_PREFIX}/plugins/platforms/"
+ qtlogo.svg
)
+
qt_copy_or_install(FILES
- qtlogo.svg
- DESTINATION "${CMAKE_INSTALL_PREFIX}/plugins/platforms/"
+ ${wasm_support_files}
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/plugins/platforms"
)
+# Need to copy the support files to the build dir in a top-level prefix build
+# So _qt_internal_wasm_add_target_helpers finds them.
+if(QT_WILL_INSTALL)
+ foreach(wasm_support_file ${wasm_support_files})
+ file(COPY "${wasm_support_file}" DESTINATION "${QT_BUILD_DIR}/plugins/platforms")
+ endforeach()
+endif()