summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/qt/moc/xmake.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/qt/moc/xmake.lua b/xmake/rules/qt/moc/xmake.lua
index d0ed37720..d162b4e11 100644
--- a/xmake/rules/qt/moc/xmake.lua
+++ b/xmake/rules/qt/moc/xmake.lua
@@ -97,7 +97,7 @@ rule("qt.moc")
-- we need compile this moc_xxx.cpp file if exists Q_PRIVATE_SLOT, @see https://github.com/xmake-io/xmake/issues/750
dependinfo.files = {}
local mocdata = io.readfile(sourcefile)
- if mocdata and mocdata:find("Q_PRIVATE_SLOT") then
+ if mocdata and mocdata:find("Q_PRIVATE_SLOT") or sourcefile_moc:endswith(".moc") then
-- add includedirs of sourcefile_moc
target:add("includedirs", path.directory(sourcefile_moc))