summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-01-09 23:45:58 +0800
committerruki <[email protected]>2020-01-09 16:35:51 +0800
commitf499ea91a2d969fc5356b1cad24612d7fd817bb7 (patch)
tree480e28c49d291ad3f18575f0e8216fdf2ea6617a
parent1c850b2aea9878a53417403a3e2dcaad6fe01e1f (diff)
improve install directory for target
-rw-r--r--xmake/core/project/target.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index c6c3e1c75..a8735e07e 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -842,11 +842,11 @@ function _instance:installdir()
if not installdir then
-- get it from target
- installdir = self:get("installdir")
+ installdir = baseoption.get("installdir")
if not installdir then
-- DESTDIR: be compatible with https://www.gnu.org/prep/standards/html_node/DESTDIR.html
- installdir = baseoption.get("installdir") or os.getenv("INSTALLDIR") or os.getenv("PREFIX") or os.getenv("DESTDIR") or platform.get("installdir")
+ installdir = self:get("installdir") or os.getenv("INSTALLDIR") or os.getenv("PREFIX") or os.getenv("DESTDIR") or platform.get("installdir")
if installdir then
installdir = installdir:trim()
end