summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShiwei Wang <[email protected]>2024-10-15 09:26:30 +0800
committerGitHub <[email protected]>2024-10-15 09:26:30 +0800
commited581b12005d60120381c9d3a6da63ea70eb769d (patch)
tree736bcd2ec4115005469a5649f035267e648fac9a
parentfcc2809210622102cdc0ec64256ff656b51eb509 (diff)
pass opt to tools/msbuild in tools/cmake
make `cmake.install(package, configs, { jobs = 1})` works as expected
-rw-r--r--xmake/modules/package/tools/cmake.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 8ee305a99..2528ec25b 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -1007,7 +1007,7 @@ end
function _build_for_msvc(package, configs, opt)
local allbuild = os.isfile("ALL_BUILD.vcxproj") and "ALL_BUILD.vcxproj" or "ALL_BUILD.vcproj"
assert(os.isfile(allbuild), "ALL_BUILD project not found!")
- msbuild.build(package, {allbuild, "-t:Rebuild"})
+ msbuild.build(package, {allbuild, "-t:Rebuild"}, opt)
end
-- do build for make
@@ -1080,10 +1080,10 @@ end
function _install_for_msvc(package, configs, opt)
local allbuild = os.isfile("ALL_BUILD.vcxproj") and "ALL_BUILD.vcxproj" or "ALL_BUILD.vcproj"
assert(os.isfile(allbuild), "ALL_BUILD project not found!")
- msbuild.build(package, {allbuild, "-t:Rebuild", "/nr:false"})
+ msbuild.build(package, {allbuild, "-t:Rebuild", "/nr:false"}, opt)
local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj"
if os.isfile(projfile) then
- msbuild.build(package, {projfile})
+ msbuild.build(package, {projfile}, opt)
os.trycp("install/bin", package:installdir())
os.trycp("install/lib", package:installdir()) -- perhaps only headers library
os.trycp("install/share", package:installdir())