From 93b2fbf41ca193a025a3bd96c946570b425f281c Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 13 Sep 2017 22:47:52 +0800 Subject: attach package info to target option --- xmake/actions/require/install.lua | 10 +++++----- 1 file 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 -- cgit v1.3.1