diff options
| author | ruki <[email protected]> | 2018-12-12 00:48:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-12-11 22:49:50 +0800 |
| commit | bdfab7b2180fd0652c135b735019b43b5dabc6db (patch) | |
| tree | 1e539aa11f65718853247082e958ace983cdf2da /xmake/actions/install/install_admin.lua | |
| parent | e429d90d867a8919b0480d1838f0d7d2bab94f27 (diff) | |
add target:installdir() and set_installdir
Diffstat (limited to 'xmake/actions/install/install_admin.lua')
| -rw-r--r-- | xmake/actions/install/install_admin.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xmake/actions/install/install_admin.lua b/xmake/actions/install/install_admin.lua index 5dfbaa42f..dc8e658af 100644 --- a/xmake/actions/install/install_admin.lua +++ b/xmake/actions/install/install_admin.lua @@ -30,7 +30,7 @@ import("core.platform.platform") import("install") -- install -function main(targetname, installdir) +function main(targetname, installdir, prefix) -- enter project directory os.cd(project.directory()) @@ -44,8 +44,18 @@ function main(targetname, installdir) -- save the current option and push a new option context option.save() + -- pass installdir to option + if installdir then + option.set("installdir", installdir) + end + + -- pass prefix to option + if prefix then + option.set("prefix", prefix) + end + -- install target - install(targetname, installdir) + install(targetname) -- restore the previous option context option.restore() |
