Skip to content

Commit

Permalink
Merge pull request #5718 from wsw0108/opt-to-msbuild
Browse files Browse the repository at this point in the history
pass opt to tools/msbuild in tools/cmake
  • Loading branch information
waruqi authored Oct 15, 2024
2 parents 794b3c0 + ed581b1 commit e5ffc55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xmake/modules/package/tools/cmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit e5ffc55

Please sign in to comment.