diff options
| author | ruki <[email protected]> | 2024-05-23 00:48:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-05-23 00:48:17 +0800 |
| commit | cfafccfa0bae60f83d27fdda1cb593da9aa0d309 (patch) | |
| tree | 8cc8f9aeb6a6aed5654a2a0a79a7e4bbe656d558 /xmake/rules | |
| parent | 118daf96839937069881cf0bc41b3c13488986bd (diff) | |
improve moc #5124
Diffstat (limited to 'xmake/rules')
| -rw-r--r-- | xmake/rules/qt/moc/xmake.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/rules/qt/moc/xmake.lua b/xmake/rules/qt/moc/xmake.lua index 623d3a6cb..d4272b688 100644 --- a/xmake/rules/qt/moc/xmake.lua +++ b/xmake/rules/qt/moc/xmake.lua @@ -23,8 +23,6 @@ rule("qt.moc") add_deps("qt.ui", {order = true}) set_extensions(".h", ".hpp") before_buildcmd_file(function (target, batchcmds, sourcefile, opt) - - -- imports import("core.tool.compiler") -- get moc @@ -109,13 +107,15 @@ rule("qt.moc") break end end + batchcmds:set_depmtime(os.mtime(sourcefile_moc)) + batchcmds:set_depcache(target:dependfile(sourcefile_moc)) else -- compile c++ source file for moc batchcmds:compile(sourcefile_moc, objectfile) + batchcmds:set_depmtime(os.mtime(objectfile)) + batchcmds:set_depcache(target:dependfile(objectfile)) end -- add deps batchcmds:add_depfiles(sourcefile) - batchcmds:set_depmtime(os.mtime(objectfile)) - batchcmds:set_depcache(target:dependfile(objectfile)) end) |
