[vcpkg] Improve handling of external toolchains. Extract MSVC settings to a separate toolchain file.
MODIFY
src/vcpkg/build.cpp
src/vcpkg/build.cpp
@@ -209,6 +209,7 @@ namespace vcpkg::Build
std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset)
{
if (pre_build_info.external_toolchain_file.has_value()) return "";
+ if (!pre_build_info.cmake_system_name.empty() && pre_build_info.cmake_system_name != "WindowsStore") return "";
const char* tonull = " >nul";
if (GlobalState::debugging)

MODIFY
src/vcpkg/vcpkgpaths.cpp
src/vcpkg/vcpkgpaths.cpp
@@ -622,7 +622,8 @@ namespace vcpkg
const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const
{
- if (prebuildinfo.external_toolchain_file)
+ if (prebuildinfo.external_toolchain_file ||
+ (!prebuildinfo.cmake_system_name.empty() && prebuildinfo.cmake_system_name != "WindowsStore"))
{
static Toolset external_toolset = []() -> Toolset {
Toolset ret;

[vcpkg] Improve handling of external toolchains. Extract MSVC settings to a separate toolchain file.