diff options
| author | ruki <[email protected]> | 2017-09-13 22:47:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-13 10:47:17 +0800 |
| commit | 93b2fbf41ca193a025a3bd96c946570b425f281c (patch) | |
| tree | f1c69a003bc0e8fa4911bc928d4d41f49545356d | |
| parent | 6b422d660efa8d807c2260bec919a120b84f3053 (diff) | |
attach package info to target option
| -rw-r--r-- | xmake/actions/require/install.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/actions/require/install.lua b/xmake/actions/require/install.lua index 88b03a71f..57573e1c1 100644 --- a/xmake/actions/require/install.lua +++ b/xmake/actions/require/install.lua @@ -31,15 +31,15 @@ import("package") import("repository") import("environment") --- attach package to target -function _attach_to_target(instance, target) - target:add(instance:fetch()) +-- attach package to option +function _attach_to_option(instance, opt) + opt:add((instance:fetch())) local orderdeps = instance:orderdeps() if orderdeps then local total = #orderdeps for idx, _ in ipairs(orderdeps) do local dep = orderdeps[total + 1 - idx] - target:add(dep:fetch()) + opt:add((dep:fetch())) end end end @@ -59,7 +59,7 @@ function _attach_to_targets(packages) if opt:enabled() then local instance = packages_local[opt:name()] if instance then - _attach_to_target(instance, target) + _attach_to_option(instance, opt) end end end |
