summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkellygod <[email protected]>2020-04-14 10:52:35 +0800
committerkellygod <[email protected]>2020-04-14 10:58:03 +0800
commitc28f63b9394681dd13ca2bada3a1fa3deb367a4d (patch)
tree00b1998254d36067f08426949787a8a1f06cbad5
parent2aec1cfaa90e1f885410ff3c2eed4f70186c2eb2 (diff)
fix: cl.exe warning D9024 :无法识别的源文件类型
-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))