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. Task-number: QTBUG-63925 Change-Id: I123b7a46fa19fa75ef214e8edb92e15ef635e5ba Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 7620c7b26ec19e902592baf7f7c4185392c2b15d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
11456b4d56
commit
a825cd1a3f
@ -23,6 +23,14 @@ function(_qt_internal_wasm_add_target_helpers target)
|
|||||||
|
|
||||||
set(APPNAME ${_target_output_name})
|
set(APPNAME ${_target_output_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(target_output_directory ${target} RUNTIME_OUTPUT_DIRECTORY)
|
||||||
|
|
||||||
get_target_property(is_test ${target} _qt_is_test_executable)
|
get_target_property(is_test ${target} _qt_is_test_executable)
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
},
|
},
|
||||||
entryFunction: window.createQtAppInstance,
|
entryFunction: window.createQtAppInstance,
|
||||||
containerElements: [screen],
|
containerElements: [screen],
|
||||||
|
@PRELOAD@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user