<?xml version="1.0" encoding="utf-8"?>
<Project>
  <Import Project="..\..\Source\VSProps\Base.Macros.props" />
  <Import Project="$(VSPropsDir)Base.Targets.props" />
  <PropertyGroup Label="Globals">
    <ProjectGuid>{D178061B-84D3-44F9-BEED-EFD18D9033F0}</ProjectGuid>
    <Keyword>MakeFileProj</Keyword>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <Import Project="$(VSPropsDir)Configuration.StaticLibrary.props" />
  <Import Project="override.props" />
  <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
    <ConfigurationType>Makefile</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
    <ConfigurationType>Makefile</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings" />
  <ImportGroup Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="$(VSPropsDir)Base.props" />
    <Import Project="$(VSPropsDir)ClDisableAllWarnings.props" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros">
    <CmakeGenerator>"Visual Studio $(VisualStudioVersion.Substring(0,2))"</CmakeGenerator>
    <DevCmdArch Condition="'$(Platform)'=='x64'">amd64</DevCmdArch>
	<DevCmdArch Condition="'$(Platform)'=='ARM64'">arm64</DevCmdArch>
    <CmakeReleaseCLI>call vsdevcmd.bat -arch=$(DevCmdArch)
      cmake -G $(CmakeGenerator) -A $(Platform) -DCMAKE_BUILD_TYPE="Release" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -DENABLE_EXCEPTIONS=OFF -S glslang -B "$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)"
    </CmakeReleaseCLI>
    <CmakeDebugCLI>call vsdevcmd.bat -arch=$(DevCmdArch)
      cmake -G $(CmakeGenerator) -A $(Platform) -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -DENABLE_EXCEPTIONS=OFF -S glslang -B "$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)"
    </CmakeDebugCLI>
    <CmakeCopyCLI>
      echo Copying..
      if not exist "$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\bin\" mkdir -p "$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\bin\"
      copy "$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\$(CONFIGURATION)\*.lib" "$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\bin"
      copy "$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\$(CONFIGURATION)\*.lib" "$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\bin"
      copy "$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\$(CONFIGURATION)\*.lib" "$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\bin"
    </CmakeCopyCLI>
    <CmakeCleanCLI>
      echo Cleaning..
      rmdir /s /q "$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\bin\"
      rmdir /s /q "$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)"
    </CmakeCleanCLI>
    <PropsAbsPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\override.props'))</PropsAbsPath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)'=='Release'">
    <OutDir>$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
    <IntDir>$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
    <NMakeBuildCommandLine>
      $(CmakeReleaseCLI)
      msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
      $(CmakeCopyCLI)
    </NMakeBuildCommandLine>
    <NMakeReBuildCommandLine>
      $(CmakeReleaseCLI)
      msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
      $(CmakeCopyCLI)
    </NMakeReBuildCommandLine>
    <NMakeCleanCommandLine>
      $(CmakeReleaseCLI)
      msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
      $(CmakeCleanCLI)
    </NMakeCleanCommandLine>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
    <OutDir>$(BuildRootDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
    <IntDir>$(BuildRootDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
    <NMakeBuildCommandLine>
      $(CmakeDebugCLI)
      msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
      $(CmakeCopyCLI)
    </NMakeBuildCommandLine>
    <NMakeReBuildCommandLine>
      $(CmakeDebugCLI)
      msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
      $(CmakeCopyCLI)
    </NMakeReBuildCommandLine>
    <NMakeCleanCommandLine>
      $(CmakeDebugCLI)
      msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
      $(CmakeCleanCLI)
    </NMakeCleanCommandLine>
  </PropertyGroup>
  <ItemDefinitionGroup>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>
