diff options
| author | ruki <[email protected]> | 2020-03-27 00:49:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-26 22:55:07 +0800 |
| commit | eb477c19a1e5f4cf7cd8320dcca30d1562c285fc (patch) | |
| tree | 99dca7504149bc85297506bbf49bad2583fa71ae /xmake/modules/package/tools/cmake.lua | |
| parent | ba5537791f5473230c72b6526cf3a41736d424cf (diff) | |
improve cmake
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 9c593ce8a..4a790ede8 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -94,7 +94,7 @@ function install(package, configs, opt) -- LIBDIR: object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian) -- local argv = {"-DCMAKE_INSTALL_PREFIX=" .. path.absolute("install"), "-DDCMAKE_INSTALL_LIBDIR=" .. path.absolute("install/lib")} - if is_plat("windows") and is_arch("x64") then + if package:is_plat("windows") and package:is_arch("x64") then table.insert(argv, "-A") table.insert(argv, "x64") end @@ -116,9 +116,9 @@ function install(package, configs, opt) os.vrunv("cmake", argv, {envs = opt.envs or buildenvs(package)}) -- do build and install - if is_plat("windows") then + if package:is_plat("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, package: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, package:debug() and "Debug" or "Release", package:is_arch("x64") and "x64" or "Win32") local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj" if os.isfile(projfile) then os.vrun("msbuild \"%s\" /property:configuration=%s", projfile, package:debug() and "Debug" or "Release") |
