diff options
| author | ruki <[email protected]> | 2021-02-25 18:38:09 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-25 18:38:09 +0800 |
| commit | 58e91c2d0d8c7dbfb83376e89a2ddf06e1c3a003 (patch) | |
| tree | 9d05218838cfc30cfab37c85e9f688f064c5999d /xmake/core/tool/builder.lua | |
| parent | 97513c4135f65579dc318de9b629abd8a0e9295c (diff) | |
| parent | 4e751bd2feb3c29fb51fedc4d81c4e7db6e4b9ac (diff) | |
Merge pull request #1255 from xmake-io/packagedeps
improve to export package deps
Diffstat (limited to 'xmake/core/tool/builder.lua')
| -rw-r--r-- | xmake/core/tool/builder.lua | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index 04349dbf2..2e503022e 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -275,28 +275,19 @@ function builder:_add_flags_from_language(flags, target, getters) end end , target = function (name) - - -- only for target local results = {} if target:type() == "target" then - -- get flagvalues (public or interface) of all dependent targets (contain packages/options) - table.join2(results, target:get_from_deps(name, {interface = true})) - -- get flagvalues of target with given flagname table.join2(results, target:get(name)) - end - return results - end - , option = function (name) - -- is target? get flagvalues of the attached options and packages - local results = {} - if target:type() == "target" then + -- get flagvalues of the attached options and packages table.join2(results, target:get_from_opts(name)) table.join2(results, target:get_from_pkgs(name)) - -- is option? get flagvalues of option with given flagname + -- get flagvalues (public or interface) of all dependent targets (contain packages/options) + table.join2(results, target:get_from_deps(name, {interface = true})) + elseif target:type() == "option" then table.join2(results, target:get(name)) end |
