summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-04-14 12:05:59 +0800
committerGitHub <[email protected]>2020-04-14 12:05:59 +0800
commit1d3fc6255fc2880e251dab99ffc62a2e3dac70c2 (patch)
treee7578fdbd06ab2e42b44c2f39c68a996cec96040
parentb984513ca7aea8f0e83337a5807dfc953058b5ff (diff)
parentc28f63b9394681dd13ca2bada3a1fa3deb367a4d (diff)
Merge pull request #764 from KellyGodLv/master
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))