diff options
| author | ruki <[email protected]> | 2021-04-08 23:46:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-04-08 23:46:30 +0800 |
| commit | f42f0150eca0b59223eea69e0ba6f80415a3c401 (patch) | |
| tree | 6d0689f2c82b545ab56dbc4b0218a7b8be5ddfb5 /xmake | |
| parent | f97b9d97af8cef7446277cb1a4f0936cab4ba51b (diff) | |
fix installdir
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/core/project/target.lua | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 6aa11d56d..7c36f1633 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1047,24 +1047,16 @@ end function _instance:installdir() -- get it from the cache - local installdir = self._INSTALLDIR + local installdir = baseoption.get("installdir") if not installdir then - -- get it from target - installdir = baseoption.get("installdir") - if not installdir then - - -- DESTDIR: be compatible with https://www.gnu.org/prep/standards/html_node/DESTDIR.html - 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 + -- DESTDIR: be compatible with https://www.gnu.org/prep/standards/html_node/DESTDIR.html + 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 - self._INSTALLDIR = installdir or false end - - -- ok - return installdir or nil + return installdir end -- get rules of the source file |
