diff options
| author | ruki <[email protected]> | 2015-06-12 13:19:19 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-12 13:19:19 +0800 |
| commit | 5dbb7213dae2568a85bd4cbc7fcfeefc8a908fc9 (patch) | |
| tree | 7f4ddddbab481985e5426dd07be207d4ffc60ddb /xmake/scripts/base/compiler.lua | |
| parent | 1b9fc52acd62fea9dfa017481b146cf59993b1df (diff) | |
add linkdirs and includedirs for platform
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
| -rw-r--r-- | xmake/scripts/base/compiler.lua | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua index bbf9a6106..e8f2508de 100644 --- a/xmake/scripts/base/compiler.lua +++ b/xmake/scripts/base/compiler.lua @@ -141,10 +141,31 @@ function compiler._addflags_from_platform(module, flags, flagnames) -- check assert(module and flags and flagnames) - -- done + -- add flags for _, flagname in ipairs(flagnames) do table.join2(flags, compiler._mapflags(module, platform.get(flagname))) end + + -- add the includedirs flags + if module.flag_includedir then + for _, includedir in ipairs(utils.wrap(platform.get("includedirs"))) do + table.join2(flags, module:flag_includedir(includedir)) + end + end + + -- add the defines flags + if module.flag_define then + for _, define in ipairs(utils.wrap(platform.get("defines"))) do + table.join2(flags, module:flag_define(define)) + end + end + + -- append the undefines flags + if module.flag_undefine then + for _, undefine in ipairs(utils.wrap(platform.get("undefines"))) do + table.join2(flags, module:flag_undefine(undefine)) + end + end end -- add flags from the target |
