diff options
| author | ruki <[email protected]> | 2018-04-19 00:48:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-04-18 22:53:30 +0800 |
| commit | f55f8a81c6743cccfcc0b76d440ebe997088f3a5 (patch) | |
| tree | 92756c45f208567551e2d23d3d4ca8d6eae99ed9 /xmake/rules/qt/xmake.lua | |
| parent | e751e95930ca8dabb61169eb2c695f70f8f907a0 (diff) | |
add moc flags
Diffstat (limited to 'xmake/rules/qt/xmake.lua')
| -rw-r--r-- | xmake/rules/qt/xmake.lua | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xmake/rules/qt/xmake.lua b/xmake/rules/qt/xmake.lua index a2df08cac..f5d33ba67 100644 --- a/xmake/rules/qt/xmake.lua +++ b/xmake/rules/qt/xmake.lua @@ -136,22 +136,16 @@ rule("qt.moc") on_build_file(function (target, headerfile_moc) -- imports + import("moc") import("core.base.option") import("core.project.config") import("core.tool.compiler") - -- get moc - local moc = target:data("qt.moc") - -- get c++ source file for moc local sourcefile_moc = path.join(config.buildir(), ".qt", "moc", target:name(), "moc_" .. path.basename(headerfile_moc) .. ".cpp") - local sourcefile_dir = path.directory(sourcefile_moc) - if not os.isdir(sourcefile_dir) then - os.mkdir(sourcefile_dir) - end -- generate c++ source file for moc - os.vrunv(moc, {headerfile_moc, "-o", sourcefile_moc}) + moc.generate(target, headerfile_moc, sourcefile_moc) -- get object file local objectfile = target:objectfile(sourcefile_moc) |
