wasm: add preload config for shared libraries build
Preload Qt plugins and QML imports by default. The json files contain file listings generated by scripts in qtbase/util/wasm/preload. Pick-to: 6.6 Task-number: QTBUG-63925 Change-Id: I123b7a46fa19fa75ef214e8edb92e15ef635e5ba Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
64007c7497
commit
7620c7b26e
@ -25,6 +25,14 @@ function(_qt_internal_wasm_add_target_helpers target)
|
||||
_qt_internal_wasm_export_name_for_target(_export_name ${target})
|
||||
set(APPEXPORTNAME ${_export_name})
|
||||
|
||||
# Shared library builds preload plugins and qml imports by default.
|
||||
# The json files are generated by scripts in qtbase/util/wasm/preload
|
||||
if (QT_FEATURE_shared)
|
||||
set(PRELOAD "preload: ['qt_plugins.json', 'qt_qml_imports.json'],")
|
||||
else()
|
||||
set(PRELOAD "")
|
||||
endif()
|
||||
|
||||
get_target_property(target_output_directory ${target} RUNTIME_OUTPUT_DIRECTORY)
|
||||
|
||||
get_target_property(is_test ${target} _qt_is_test_executable)
|
||||
|
@ -59,6 +59,7 @@
|
||||
},
|
||||
entryFunction: window.@APPEXPORTNAME@,
|
||||
containerElements: [screen],
|
||||
@PRELOAD@
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user