diff options
| author | ruki <[email protected]> | 2025-07-19 00:54:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-07-19 00:54:36 +0800 |
| commit | e372a64df110f3700a37edb42968a6275376b9d4 (patch) | |
| tree | 33e7a24428c752bcdaee9a4a83753270ac4f6d8f /xmake/core | |
| parent | ee6ee5375f25d968f9299af995254973db43e44b (diff) | |
add pkgenvs to target
Diffstat (limited to 'xmake/core')
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/project/project.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua index 5c12d6b6d..70f135706 100644 --- a/xmake/core/sandbox/modules/import/core/project/project.lua +++ b/xmake/core/sandbox/modules/import/core/project/project.lua @@ -128,6 +128,11 @@ end -- config target function sandbox_core_project._config_target(target, opt) + + -- enter the environments of the target packages + local oldenvs = os.addenvs(target:pkgenvs()) + + -- do config local before_config = target:script("config_before") if before_config then before_config(target, opt) @@ -160,6 +165,9 @@ function sandbox_core_project._config_target(target, opt) if config_after then config_after(target, opt) end + + -- leave the environments of the target packages + os.setenvs(oldenvs) end -- config targets, TODO: We should support parallel configuration |
