From 8eee558af75cfc106ee862bc32c5d5804c4f908b Mon Sep 17 00:00:00 2001 From: 白喵 <478688389@qq.com> Date: Wed, 28 Aug 2024 14:45:35 +0800 Subject: use ALL_BUILD project build for msvc --- xmake/modules/package/tools/cmake.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 4af3d22ad..01761f71c 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -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 @@ -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}) -- cgit v1.3.1