From 89415ed089e1ea087c334fa057cc440dddb65dfd Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 5 Apr 2020 23:49:55 +0800 Subject: improve xcode.application rule --- xmake/core/project/target.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'xmake/core/project/target.lua') diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 51eef59b9..e91f09408 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -979,8 +979,14 @@ function _instance:sourcefiles() deleted = true end - -- match source files - local results = os.match(file) + -- find source files + local results = os.files(file) + if #results == 0 then + -- attempt to find source directories if maybe compile it as directory with the custom rules + if #self:filerules(file) > 0 then + results = os.dirs(file) + end + end if #results == 0 then local sourceinfo = (self:get("__sourceinfo_files") or {})[file] or {} utils.warning("cannot match %s(%s).%s_files(\"%s\") at %s:%d", self:type(), self:name(), utils.ifelse(deleted, "del", "add"), file, sourceinfo.file or "", sourceinfo.line or -1) -- cgit v1.3.1