summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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)