diff options
| author | jingkaimori <[email protected]> | 2023-04-01 18:28:50 +0800 |
|---|---|---|
| committer | jingkaimori <[email protected]> | 2023-04-01 18:28:50 +0800 |
| commit | deb6f50f31462813059fb08ce842a15218bb869f (patch) | |
| tree | a06e4a65eb0431c82ee16ca03c328fe1e6162f57 | |
| parent | 093c2670ad9ad99dfd24d56727d13d0002d8c9bb (diff) | |
add missing documents and branches
| -rw-r--r-- | xmake/rules/qt/load.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/qt/xmake.lua | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua index bd23804fb..6544d2409 100644 --- a/xmake/rules/qt/load.lua +++ b/xmake/rules/qt/load.lua @@ -94,6 +94,8 @@ function _add_plugins(target, plugins) if plugin.linkdirs then target:values_add("qt.linkdirs", table.unpack(table.wrap(plugin.linkdirs))) end + -- TODO: add prebuilt object files in qt sdk. + -- these file is located at plugins/xxx/objects-Release/xxxPlugin_init/xxxPlugin_init.cpp.o end end @@ -368,7 +370,9 @@ function main(target, opt) _add_includedirs(target, path.join(qt.mkspecsdir, "wasm-emscripten")) target:add("rpathdirs", qt.libdir) target:add("linkdirs", qt.libdir) - for _, filepath in ipairs(os.files(path.join(qt.libdir, "objects-*", "**.o"))) do + -- add prebuilt object files in qt sdk. + -- these file is located at lib/objects-Release/xxxmodule_resources_x/.rcc/xxxmodule.cpp.o + for _, filepath in ipairs(os.files(path.join(qt.libdir, "objects-*", "*_resources_*", ".rcc", "*.o"))) do table.insert(target:objectfiles(), filepath) end target:add("ldflags", "-s WASM=1", "-s FETCH=1", "-s FULL_ES2=1", "-s FULL_ES3=1", "-s USE_WEBGL2=1", "--bind") diff --git a/xmake/rules/qt/xmake.lua b/xmake/rules/qt/xmake.lua index 0a75e6e08..08e8265c2 100644 --- a/xmake/rules/qt/xmake.lua +++ b/xmake/rules/qt/xmake.lua @@ -248,8 +248,12 @@ rule("qt.quickapp_static") end elseif target:is_plat("wasm") then plugins.QWasmIntegrationPlugin = {linkdirs = "plugins/platforms", links = {"qwasm"}} - if qt_sdkver and qt_sdkver:lt("6.0") then - table.join2(frameworks, "QtEventDispatcherSupport", "QtFontDatabaseSupport", "QtEglSupport") + if qt_sdkver then + if qt_sdkver:lt("6.0") then + table.join2(frameworks, "QtEventDispatcherSupport", "QtFontDatabaseSupport", "QtEglSupport") + else + table.join2(frameworks, "QtOpenGL") + end end end import("load")(target, {gui = true, plugins = plugins, frameworks = frameworks}) |
