diff options
| author | ruki <[email protected]> | 2020-11-21 20:23:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-21 20:23:52 +0800 |
| commit | 287d1e2ca2bd376d488f91d58dd36f45d2a3cf6a (patch) | |
| tree | a7917cb9ec1f393d39512bc2e33731093d08e3eb /xmake/core/package/package.lua | |
| parent | b10a4d83559dd0598c2a2263addb470160565f16 (diff) | |
add DYLD_LIBRARY_PATH
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index b46077f08..4361cb29d 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -434,6 +434,9 @@ function _instance:envs() -- add LD_LIBRARY_PATH to load *.so directory if os.host() ~= "windows" and self:is_plat(os.host()) and self:is_arch(os.arch()) then envs.LD_LIBRARY_PATH = {"lib"} + if os.host() == "macosx" then + envs.DYLD_LIBRARY_PATH = {"lib"} + end end self._ENVS = envs end @@ -465,7 +468,7 @@ function _instance:envs_enter() local installdir = self:installdir() for name, values in pairs(self:envs()) do oldenvs[name] = oldenvs[name] or os.getenv(name) - if name == "PATH" or name == "LD_LIBRARY_PATH" then + if name == "PATH" or name == "LD_LIBRARY_PATH" or name == "DYLD_LIBRARY_PATH" then for _, value in ipairs(values) do if path.is_absolute(value) then os.addenv(name, value) |
