Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ALL_BUILD project build for msvc #5523

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions xmake/modules/package/tools/cmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,9 @@ end

-- do build for msvc
function _build_for_msvc(package, configs, opt)
local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!")
msbuild.build(package, {slnfile, "-t:Rebuild"})
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"})
end

-- do build for make
Expand Down Expand Up @@ -1056,8 +1057,9 @@ end

-- do install for msvc
function _install_for_msvc(package, configs, opt)
local slnfile = assert(find_file("*.sln", os.curdir()), "*.sln file not found!")
msbuild.build(package, {slnfile, "-t:Rebuild", "/nr:false"})
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"})
local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj"
if os.isfile(projfile) then
msbuild.build(package, {projfile})
Expand Down
Loading