diff options
| author | ruki <[email protected]> | 2019-09-01 12:11:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-09-01 12:11:59 +0800 |
| commit | 571d0614ff5b16c9e9648f8c3a529e9f3bd82c26 (patch) | |
| tree | c5768eb693f75081815e20ef5347bd8f5132825e | |
| parent | f375773b28d671a8d4885ea09e64011106f077f9 (diff) | |
improve file rule extension
| -rw-r--r-- | xmake/core/project/target.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index c20d1f190..911d8ddbf 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -868,13 +868,14 @@ function _instance:filerules(sourcefile) extension2rules = {} for _, r in pairs(table.wrap(self:rules())) do for _, extension in ipairs(table.wrap(r:get("extensions"))) do + extension = extension:lower() extension2rules[extension] = extension2rules[extension] or {} table.insert(extension2rules[extension], r) end end self._EXTENSION2RULES = extension2rules end - for _, r in ipairs(table.wrap(extension2rules[path.extension(sourcefile)])) do + for _, r in ipairs(table.wrap(extension2rules[path.extension(sourcefile):lower()])) do table.insert(rules, r) end |
