summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/qt/moc/xmake.lua8
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)