From c28f63b9394681dd13ca2bada3a1fa3deb367a4d Mon Sep 17 00:00:00 2001 From: kellygod Date: Tue, 14 Apr 2020 10:52:35 +0800 Subject: fix: cl.exe warning D9024 :无法识别的源文件类型 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xmake/rules/qt/moc/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.3.1