diff options
| author | ruki <[email protected]> | 2022-08-24 00:50:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-24 00:50:39 +0800 |
| commit | aaceeb626c1d7fde85de0cc0d1a105b58e630314 (patch) | |
| tree | 855c2127b6a5bfaeef9b89c83f4f19be40b7a3a2 /xmake/modules/package/tools/xmake.lua | |
| parent | 0864717f9b9afae5c3fa1a983605b7df2abba8fd (diff) | |
fix XMAKE_CONFIGDIR
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/xmake.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua index cfb22f6dd..5935aa58f 100644 --- a/xmake/modules/package/tools/xmake.lua +++ b/xmake/modules/package/tools/xmake.lua @@ -219,19 +219,25 @@ end -- get the build environments function buildenvs(package, opt) - return _get_package_toolchains_envs(package, opt) + local envs = _get_package_toolchains_envs(package, opt) + -- we should avoid using $XMAKE_CONFIGDIR outside to cause conflicts + envs.XMAKE_CONFIGDIR = os.curdir() + return envs end -- install package function install(package, configs, opt) - -- pass local repositories + -- get build environments opt = opt or {} + local envs = opt.envs or buildenvs(package) + + -- pass local repositories for _, repo in ipairs(repository.repositories()) do local repo_argv = {"repo"} _set_builtin_argv(repo_argv) table.join2(repo_argv, {"--add", repo:name(), repo:directory()}) - os.vrunv("xmake", repo_argv) + os.vrunv("xmake", repo_argv, {envs = envs}) end -- pass configurations @@ -248,9 +254,6 @@ function install(package, configs, opt) end end - -- get build environments - local envs = opt.envs or buildenvs(package) - -- do configure os.vrunv("xmake", argv, {envs = envs}) |
