diff options
Diffstat (limited to 'xmake/modules/package/tools/nmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/nmake.lua | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/xmake/modules/package/tools/nmake.lua b/xmake/modules/package/tools/nmake.lua index d8c40efca..c618531ce 100644 --- a/xmake/modules/package/tools/nmake.lua +++ b/xmake/modules/package/tools/nmake.lua @@ -24,17 +24,16 @@ import("core.project.config") import("core.tool.toolchain") import("lib.detect.find_tool") +-- get msvc +function _get_msvc(package) + local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}) + assert(msvc:check(), "vs not found!") -- we need check vs envs if it has been not checked yet + return msvc +end + -- get the build environments function buildenvs(package, opt) - local envs = {} - for name, values in pairs(toolchain.load("msvc"):runenvs()) do - local oldvalues = os.getenv(name) - if oldvalues then - values = values .. path.envsep() .. oldvalues - end - envs[name] = values - end - return envs + return os.joinenvs(_get_msvc(package):runenvs()) end -- build package |
