From 02e1c4981878c342aab1f793a2cb87793ce26bef Mon Sep 17 00:00:00 2001 From: Silent Date: Sat, 2 Oct 2021 01:07:58 +0200 Subject: [PATCH] Set up VS environment before calling cmake in glslang and spirv (#10952) This makes VS use its own cmake instead of the one in PATH, if available. --- 3rdparty/SPIRV/spirv.vcxproj | 6 ++++-- 3rdparty/glslang/glslang.vcxproj | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/3rdparty/SPIRV/spirv.vcxproj b/3rdparty/SPIRV/spirv.vcxproj index 1ce9784ee1..148df30120 100644 --- a/3rdparty/SPIRV/spirv.vcxproj +++ b/3rdparty/SPIRV/spirv.vcxproj @@ -38,8 +38,10 @@ "Visual Studio $(VisualStudioVersion.Substring(0,2))" - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)/SPIRV-Headers')) SPIRV-Tools -B build - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)/SPIRV-Headers')) -S SPIRV-Tools -B build + call vsdevcmd.bat -arch=amd64 + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)/SPIRV-Headers')) SPIRV-Tools -B build + call vsdevcmd.bat -arch=amd64 + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)/SPIRV-Headers')) -S SPIRV-Tools -B build $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\buildfiles\msvc\common_default.props')) diff --git a/3rdparty/glslang/glslang.vcxproj b/3rdparty/glslang/glslang.vcxproj index a305e3ec01..2d730e1c73 100644 --- a/3rdparty/glslang/glslang.vcxproj +++ b/3rdparty/glslang/glslang.vcxproj @@ -38,8 +38,10 @@ "Visual Studio $(VisualStudioVersion.Substring(0,2))" - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT -S glslang -B build - cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT -S glslang -B build + call vsdevcmd.bat -arch=amd64 + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT -S glslang -B build + call vsdevcmd.bat -arch=amd64 + cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MTd -DLLVM_USE_CRT_RELEASE=MT -S glslang -B build $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\buildfiles\msvc\common_default.props'))