From 3db61cf9851ae7df1685ec2c8525f5d45bc52d82 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 27 Apr 2021 14:36:01 -0400 Subject: VS: Fix VCTargetsPath detection when cross-compiling Tell `MSBuild` to use the same `Platform` that we generate into the `VCTargetsPath` detection project. Fixes: #22068 --- Source/cmGlobalVisualStudio10Generator.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 93fbe37..6c52ce0 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -1036,6 +1036,7 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf) cmd.push_back(this->GetMSBuildCommand()); cmd.push_back(vcxproj); cmd.push_back("/p:Configuration=Debug"); + cmd.push_back(cmStrCat("/p:Platform=", this->GetPlatformName())); cmd.push_back(std::string("/p:VisualStudioVersion=") + this->GetIDEVersion()); std::string out; -- cgit v0.12