diff options
| author | fy <[email protected]> | 2018-12-12 17:45:48 +0800 |
|---|---|---|
| committer | fy <[email protected]> | 2018-12-12 17:45:48 +0800 |
| commit | e1c447a8178ca22e315243a8b673b85b85742c8e (patch) | |
| tree | 76cb5bf690f45a4933850debe75338f8dcf8d785 /xmake/modules/package/tools/cmake.lua | |
| parent | a8e3c0823bf452378184e126e7ef0f1867800d2a (diff) | |
vrunv fix
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 15 |
1 files 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!") |
