<Project DefaultTargets="BuildAll" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup>
    <ConfigurationCPP>Release (C++)</ConfigurationCPP>
    <ConfigurationCPPDebug>Debug (C++)</ConfigurationCPPDebug>
  </PropertyGroup>

  <!--Include all the project files that we want to build into the "CoreProjectsToBuild" item-->
  <ItemGroup>
    <CoreProjectsToBuild Include="..\MSCL\MSCL.vcxproj" />
  </ItemGroup>

  <!--create the BuildAll Target which calls everything we want to do-->
  <PropertyGroup>
    <FullBuildTask>
    
      <!--Clean and build the core project in Release build-->
      CleanCore;                  
      BuildCore;
      CleanCore64;
      BuildCore64;
      
      <!--Clean and build the core project in Debug build-->
      CleanCoreDebug;
      BuildCoreDebug;
      CleanCore64Debug;
      BuildCore64Debug;
      
    </FullBuildTask>
  </PropertyGroup>
  <Target Name="BuildAll" DependsOnTargets="$(FullBuildTask)"/>


  <!--CLEAN CORE C++ PROJECT (x86) (Static Lib)-->
  <Target Name="CleanCore">
    <Message Text="=====================Cleaning the Core Project (Release x86)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             Targets="Clean"
             Properties="Configuration=$(ConfigurationCPP)">
    </MSBuild>
  </Target>
  
  <!--CLEAN CORE C++ PROJECT (x64) (Static Lib)-->
  <Target Name="CleanCore64">
    <Message Text="=====================Cleaning the Core Project (Release x64)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             Targets="Clean"
             Properties="Configuration=$(ConfigurationCPP);Platform=x64">
    </MSBuild>
  </Target>
  
  <!--CLEAN CORE C++ PROJECT (x86) in DEBUG (Static Lib)-->
  <Target Name="CleanCoreDebug">
    <Message Text="=====================Cleaning the Core Project (Debug x86)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             Targets="Clean"
             Properties="Configuration=$(ConfigurationCPPDebug)">
    </MSBuild>
  </Target>
  
  <!--CLEAN CORE C++ PROJECT (x64) in DEBUG (Static Lib)-->
  <Target Name="CleanCore64Debug">
    <Message Text="=====================Cleaning the Core Project (Debug x64)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             Targets="Clean"
             Properties="Configuration=$(ConfigurationCPPDebug);Platform=x64">
    </MSBuild>
  </Target>
  
  
  
  <!--BUILD CORE C++ PROJECT (x86) (Static Lib)-->
  <Target Name="BuildCore">
    <Message Text="=====================Building the Core Project (Release x86)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             ContinueOnError="false"
             Properties="Configuration=$(ConfigurationCPP)">
      <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
    </MSBuild>
  </Target>
  
  <!--BUILD CORE C++ PROJECT (x64) (Static Lib)-->
  <Target Name="BuildCore64">
    <Message Text="=====================Building the Core Project (Release x64)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             ContinueOnError="false"
             Properties="Configuration=$(ConfigurationCPP);Platform=x64">
      <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
    </MSBuild>
  </Target>
  
  <!--BUILD CORE C++ PROJECT (x86) in Debug (Static Lib)-->
  <Target Name="BuildCoreDebug">
    <Message Text="=====================Building the Core Project (Debug x86)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             ContinueOnError="false"
             Properties="Configuration=$(ConfigurationCPPDebug)">
      <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
    </MSBuild>
  </Target>
  
  <!--BUILD CORE C++ PROJECT (x86) in Debug (Static Lib)-->
  <Target Name="BuildCore64Debug">
    <Message Text="=====================Building the Core Project (Debug x64)====================="/>
    <MSBuild Projects="@(CoreProjectsToBuild)"
             ContinueOnError="false"
             Properties="Configuration=$(ConfigurationCPPDebug);Platform=x64">
      <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
    </MSBuild>
  </Target>
  
</Project>