2 ***********************************************************************************************
5 WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
6 created a backup copy. Incorrect changes to this file will make it
7 impossible to load or build your projects from the command-line or the IDE.
9 CREATED: 08/10/2014 by Nico Moss
11 DESCRIPTION: This file defines the steps/targets required to build WAF based projects
13 Copyright (C), Crytek Studios, 2014. All rights reserved.
14 ***********************************************************************************************
17 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
19 <!-- *******************************************************************************************
21 ******************************************************************************************* -->
22 <!-- Needed for single compile -->
24 <AvailableItemName Include="ClCompile">
25 <Targets>ClCompile</Targets>
30 <WAF_MSBuildDirectory>$(MSBuildProjectDirectory)\..\..\_WAF_\msbuild</WAF_MSBuildDirectory>
33 <!-- *******************************************************************************************
35 ******************************************************************************************* -->
37 <PropertyPageSchema Include="$(WAF_MSBuildDirectory)\waf_property_sheet.xml" Condition="Exists('$(WAF_MSBuildDirectory)\waf_property_sheet.xml')" />
40 <!-- *******************************************************************************************
41 Platform specific targets
42 ******************************************************************************************* -->
43 <Import Project="$(WAF_MSBuildDirectory)\$(Platform)\$(Platform)_specific.targets" Condition="Exists('$(WAF_MSBuildDirectory)\$(Platform)\$(Platform)_specific.targets')" />
45 <!-- *******************************************************************************************
46 Selective Build (reduce to selected CLCompile
47 ******************************************************************************************* -->
49 <Target Name="_SelectedFiles">
51 <SelectedFiles Include="$(SelectedFiles)"/>
54 <BuildType Condition="'$(BuildType)' == ''">Build</BuildType>
58 <Target Name="SelectClCompile" BeforeTargets="ClCompile" DependsOnTargets="_SelectedFiles;">
59 <ItemGroup Condition="'@(SelectedFiles)'!=''">
60 <ClCompile Remove="@(ClCompile)" Condition="'%(Identity)'!='@(SelectedFiles)'"/>
64 <!-- *******************************************************************************************
66 ******************************************************************************************* -->
67 <Target Name="WAF_BuildCore">
68 <Message Text="Exec Command: %(ClCompile.WAF_BuildCommandLine)" />
69 <Exec Command="%(ClCompile.WAF_BuildCommandLine)" Condition="'%(ClCompile.WAF_BuildCommandLine)'!=''"/>
72 <Target Name="WAF_RebuildCore">
73 <Message Text="Exec Command: %(ClCompile.WAF_RebuildCommandLine)" />
74 <Exec Command="%(ClCompile.WAF_RebuildCommandLine)" Condition="'%(ClCompile.WAF_RebuildCommandLine)'!=''"/>
77 <Target Name="WAF_CleanCore">
78 <Message Text="Exec Command: %(ClCompile.WAF_CleanCommandLine)" />
79 <Exec Command="%(ClCompile.WAF_CleanCommandLine)" Condition="'%(ClCompile.WAF_CleanCommandLine)'!=''"/>
82 <Target Name="WAF_ClCompileCore" DependsOnTargets="SelectClCompile;" >
85 <_waf_single_compile_command Condition="'%(ClCompile.WAF_SingleCompilationMode)' == 'Code'"></_waf_single_compile_command>
86 <_waf_single_compile_command Condition="'%(ClCompile.WAF_SingleCompilationMode)' == 'Disassembly'">--show-disassembly=True</_waf_single_compile_command>
87 <_waf_single_compile_command Condition="'%(ClCompile.WAF_SingleCompilationMode)' == 'Preprocess'">--show-preprocessed-file=True</_waf_single_compile_command>
88 <_waf_single_compile_command Condition="'%(ClCompile.WAF_SingleCompilationMode)' == 'Header'">--show-includes=True</_waf_single_compile_command>
91 <!-- Execute compile selection of files-->
92 <Message Text="Exec Command: %(ClCompile.WAF_BuildCommandLine) $(_waf_single_compile_command) --file-filter=@(ClCompile)" Condition="'%(ClCompile.WAF_BuildCommandLine)'!='' and '@(ClCompile)'!='' and '%(ClCompile.WAF_CommandOverride)' == ''"/>
93 <Exec Command="%(ClCompile.WAF_BuildCommandLine) $(_waf_single_compile_command) --file-filter=@(ClCompile)" Condition="'%(ClCompile.WAF_BuildCommandLine)'!='' and '@(ClCompile)'!='' and '%(ClCompile.WAF_CommandOverride)' == ''"/>
95 <!-- Execute override for WAF command files-->
96 <Message Text="Exec Command: '%(ClCompile.WAF_ExecPath)' '%(ClCompile.WAF_CommandOverride)'" Condition="'%(ClCompile.WAF_CommandOverride)' != ''"/>
97 <Exec Command="%(ClCompile.WAF_ExecPath) %(ClCompile.WAF_CommandOverride)" Condition="'%(ClCompile.WAF_CommandOverride)' != ''"/>
101 <!-- *******************************************************************************************
103 ******************************************************************************************* -->
105 <Target Name="Build" DependsOnTargets="WAF_BuildCore" >
108 <Target Name="Rebuild" DependsOnTargets="WAF_RebuildCore" >
111 <Target Name="Clean" DependsOnTargets="WAF_CleanCore" >
114 <Target Name="ClCompile" DependsOnTargets="WAF_ClCompileCore" >
117 <!-- *******************************************************************************************
119 As a last thing set ConfigurationType -> Application
120 This is after we loaded all MSBUILD common targets with the ConfigurationType specified by the project.
121 Reason: Visual Studio appears to take the last ConfigurationType to enable/disable some features
122 e.g. "Single file compilation" and "Durango deploy and start debugging"
123 ******************************************************************************************* -->
125 <ConfigurationType>Application</ConfigurationType>