diff options
| -rw-r--r-- | tests/projects/qt/quickplugin/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/qt/qmltyperegistrar/xmake.lua | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/projects/qt/quickplugin/xmake.lua b/tests/projects/qt/quickplugin/xmake.lua index afd4cc59b..105477938 100644 --- a/tests/projects/qt/quickplugin/xmake.lua +++ b/tests/projects/qt/quickplugin/xmake.lua @@ -4,5 +4,7 @@ target("demo") add_rules("qt.qmlplugin") add_headerfiles("src/*.h") add_files("src/*.cpp") + -- add files with Q_OBJECT meta (only for qt.moc) + add_files("src/*.h") set_values("qt.qmlplugin.import_name", "My.Plugin")
\ No newline at end of file diff --git a/xmake/rules/qt/qmltyperegistrar/xmake.lua b/xmake/rules/qt/qmltyperegistrar/xmake.lua index 172bfd92b..8e25f109e 100644 --- a/xmake/rules/qt/qmltyperegistrar/xmake.lua +++ b/xmake/rules/qt/qmltyperegistrar/xmake.lua @@ -102,7 +102,7 @@ rule("qt.qmltyperegistrar") -- gen sourcefile batchcmds:show_progress(opt.progress, "${color.build.object}generating.qt.qmltyperegistrar %s", path.filename(sourcefile)) - qmltype_source = os.vrunv(qmltyperegistrar, table.join(args, metatypefiles)) + batchcmds:vrunv(qmltyperegistrar, table.join(args, metatypefiles)) -- add objectfile local objectfile = target:objectfile(sourcefile) @@ -118,8 +118,8 @@ rule("qt.qmltyperegistrar") end) after_build(function(target) - local qmldir = path.join(target:scriptdir(), target:values("qt.qmlplugin.qmldirfile")) + local qmldir = target:values("qt.qmlplugin.qmldirfile") if qmldir then - os.cp(qmldir, target:targetdir()) + os.cp(path.join(target:scriptdir(), qmldir), target:targetdir()) end end) |
