From e1c447a8178ca22e315243a8b673b85b85742c8e Mon Sep 17 00:00:00 2001 From: fy Date: Wed, 12 Dec 2018 17:45:48 +0800 Subject: vrunv fix --- xmake/modules/package/tools/cmake.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index efee315be..d73e3c0e1 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -30,7 +30,14 @@ import("lib.detect.find_file") function install(package, configs) os.mkdir("build/install") local oldir = os.cd("build") - local argv = {} + + local argv = { + "-DCMAKE_INSTALL_PREFIX=\"" .. path.absolute("install") .. "\"" + } + + if is_plat("windows") and is_arch("x64") then + table.insert(argv, "-A x64") + end for name, value in pairs(configs) do value = tostring(value):trim() @@ -39,11 +46,7 @@ function install(package, configs) end end - if is_plat("windows") and is_arch("x64") then - os.vrunv(format("cmake -A x64 -DCMAKE_INSTALL_PREFIX=\"%s\" ..", path.absolute("install")), argv) - else - os.vrunv(format("cmake -DCMAKE_INSTALL_PREFIX=\"%s\" ..", path.absolute("install")), argv) - end + os.vrunv("cmake", argv) if is_host("windows") then local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!") -- cgit v1.3.1