diff options
| author | ruki <[email protected]> | 2018-09-15 00:58:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-09-14 23:49:46 +0800 |
| commit | 16408b969fd8e96f5ab9c74be4469ca66187165e (patch) | |
| tree | 84bc3e60bbcd112272240bcc6bb95b8d585f39b6 | |
| parent | 5459e9f49a3922c9fdc3e63631aa88f8292736b0 (diff) | |
improve cmake.build
| -rw-r--r-- | xmake/modules/package/builder/cmake.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/package/builder/cmake.lua b/xmake/modules/package/builder/cmake.lua index 05b576399..0146c259a 100644 --- a/xmake/modules/package/builder/cmake.lua +++ b/xmake/modules/package/builder/cmake.lua @@ -30,10 +30,11 @@ import("lib.detect.find_file") function build(package) os.mkdir("build/install") os.cd("build") + -- TODO -a x64/x86 os.vrun("cmake -DCMAKE_INSTALL_PREFIX=\"%s\" ..", path.absolute("install")) if is_host("windows") then local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!") - os.vrun("msbuild %s -nologo -t:Rebuild -p:Configuration=%s -p:Platform=%s", slnfile, is_mode("debug") and "Debug" or "Release", is_arch("x64") and "x64" or "Win32") + os.vrun("msbuild \"%s\" -nologo -t:Rebuild -p:Configuration=%s -p:Platform=%s", slnfile, is_mode("debug") and "Debug" or "Release", is_arch("x64") and "x64" or "Win32") else os.vrun("make") end @@ -44,7 +45,7 @@ function install(package) os.cd("build") if is_host("windows") then local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj" - os.vrun("msbuild %s /property:configuration=%s", projfile, is_mode("debug") and "Debug" or "Release") + os.vrun("msbuild \"%s\" /property:configuration=%s", projfile, is_mode("debug") and "Debug" or "Release") else os.vrun("make install") end |
