summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEven Oscar Andersen <[email protected]>2024-06-24 11:41:45 +0200
committerEven Oscar Andersen <[email protected]>2024-09-05 17:28:19 +0200
commitcd78cf27a19ecd20cfc3ad44b593b21d1ae2f249 (patch)
tree8b44341c7e8f0fd7cdb7cac1d4331c9c5c09f6b3 /src
parent00ce86a90815443562bebd68277bda77972bc65d (diff)
wasm: Fix conflict usage for tst_qwasmwindow_harness.html
There is a default tst_qwasmwindow_harness.html created, and we have our own in addition. This creates problems if one runs configure and do not perform a clean build afterwards as we would be left with the autogenerated file. The solution is to rename our custom file so that there is no conflict. Change-Id: I1f0436eea752059d4dcf22407c760339eed46c09 Reviewed-by: Piotr WierciƄski <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt6WasmMacros.cmake58
1 files changed, 30 insertions, 28 deletions
diff --git a/src/corelib/Qt6WasmMacros.cmake b/src/corelib/Qt6WasmMacros.cmake
index 283243006ad..9166b7fdf3d 100644
--- a/src/corelib/Qt6WasmMacros.cmake
+++ b/src/corelib/Qt6WasmMacros.cmake
@@ -56,41 +56,43 @@ function(_qt_internal_wasm_add_target_helpers target)
configure_file("${WASM_BUILD_DIR}/libexec/util.js"
"${target_output_directory}/util.js" COPYONLY)
else()
+ get_target_property(no_wasm_files ${target} NO_WASM_DEFAULT_FILES)
+
if(target_output_directory)
set(_target_directory "${target_output_directory}")
else()
set(_target_directory "${CMAKE_CURRENT_BINARY_DIR}")
endif()
- configure_file("${WASM_BUILD_DIR}/plugins/platforms/wasm_shell.html"
- "${_target_directory}/${_target_output_name}.html" @ONLY)
- if(CMAKE_CONFIGURATION_TYPES) # if multiconfig generator
- add_custom_command(
- TARGET ${target} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${_target_directory}/${_target_output_name}.html"
- ${_target_directory}/$<CONFIG>/${_target_output_name}.html
- )
- add_custom_command(
- TARGET ${target} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${WASM_BUILD_DIR}/plugins/platforms/qtloader.js"
- ${_target_directory}/$<CONFIG>/qtloader.js
- )
- add_custom_command(
- TARGET ${target} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${WASM_BUILD_DIR}/plugins/platforms/qtlogo.svg"
- ${_target_directory}/$<CONFIG>/qtlogo.svg
- )
- else()
- configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtloader.js"
- ${_target_directory}/qtloader.js COPYONLY)
- configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtlogo.svg"
- ${_target_directory}/qtlogo.svg COPYONLY)
-
+ if (NOT no_wasm_files)
+ configure_file("${WASM_BUILD_DIR}/plugins/platforms/wasm_shell.html"
+ "${_target_directory}/${_target_output_name}.html" @ONLY)
+ if(CMAKE_CONFIGURATION_TYPES) # if multiconfig generator
+ add_custom_command(
+ TARGET ${target} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${_target_directory}/${_target_output_name}.html"
+ ${_target_directory}/$<CONFIG>/${_target_output_name}.html
+ )
+ add_custom_command(
+ TARGET ${target} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${WASM_BUILD_DIR}/plugins/platforms/qtloader.js"
+ ${_target_directory}/$<CONFIG>/qtloader.js
+ )
+ add_custom_command(
+ TARGET ${target} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${WASM_BUILD_DIR}/plugins/platforms/qtlogo.svg"
+ ${_target_directory}/$<CONFIG>/qtlogo.svg
+ )
+ else()
+ configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtloader.js"
+ ${_target_directory}/qtloader.js COPYONLY)
+ configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtlogo.svg"
+ ${_target_directory}/qtlogo.svg COPYONLY)
+ endif()
endif()
-
endif()
if(QT_FEATURE_thread)