summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-17 23:31:55 +0800
committerruki <[email protected]>2021-05-17 23:31:55 +0800
commite6f4ac96d485a22891a334108bfd145ad750007d (patch)
tree71bec25ce0b33630de76cbafd19c08b65d5e0d6d
parent8f1fe3d243962b85f54a678cb9304882571746a1 (diff)
improve tools/cmake
-rw-r--r--xmake/modules/package/tools/cmake.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index b0b92396a..16445351f 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -537,7 +537,7 @@ end
function _install_for_msvc(package, configs, opt)
local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!")
local runenvs = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}):runenvs()
- local msbuild = find_tool("msbuild", {envs = runenvs})
+ local msbuild = assert(find_tool("msbuild", {envs = runenvs}), "msbuild not found!")
os.vrunv(msbuild.program, {slnfile, "-nologo", "-t:Rebuild", "-m", "-p:Configuration=" .. (package:is_debug() and "Debug" or "Release"), "-p:Platform=" .. (package:is_arch("x64") and "x64" or "Win32")}, {envs = runenvs})
local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj"
if os.isfile(projfile) then