summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/action/require/packagenv.lua2
-rw-r--r--xmake/modules/private/xrepo/action/env.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/packagenv.lua b/xmake/modules/private/action/require/packagenv.lua
index 44382e15c..6eb4862b9 100644
--- a/xmake/modules/private/action/require/packagenv.lua
+++ b/xmake/modules/private/action/require/packagenv.lua
@@ -35,7 +35,7 @@ function _enter_package(package_name, envs, installdir)
-- add the new environments
for name, values in pairs(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)
diff --git a/xmake/modules/private/xrepo/action/env.lua b/xmake/modules/private/xrepo/action/env.lua
index ecdacad8f..2dfede2ce 100644
--- a/xmake/modules/private/xrepo/action/env.lua
+++ b/xmake/modules/private/xrepo/action/env.lua
@@ -171,7 +171,7 @@ function _package_addenvs(envs, instance)
-- add run envs, e.g. PATH, LD_LIBRARY_PATH, ..
local installdir = instance:installdir()
for name, values in pairs(instance:envs()) do
- 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
_package_addenv(envs, name, value)