diff options
| author | ruki <[email protected]> | 2020-04-05 23:49:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-05 23:49:55 +0800 |
| commit | 89415ed089e1ea087c334fa057cc440dddb65dfd (patch) | |
| tree | 40b89f40968601acf2a0b778208a371ac6ee8a93 /xmake/core | |
| parent | 6a67eb4ca0b1b8f375b0aa190fb85bca8477b595 (diff) | |
improve xcode.application rule
Diffstat (limited to 'xmake/core')
| -rw-r--r-- | xmake/core/project/target.lua | 10 |
1 files changed, 8 insertions, 2 deletions
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) |
