summaryrefslogtreecommitdiff
path: root/xmake/actions/install/install_admin.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/actions/install/install_admin.lua')
-rw-r--r--xmake/actions/install/install_admin.lua14
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()