source: trunk/build/vs2010/Lol.Fx.targets @ 1518

Last change on this file since 1518 was 1518, checked in by sam, 8 years ago

build: reorganise all the build stuff so that it lies in build/ and
make sure each .vcxproj file is with its corresponding source code.

File size: 2.8 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3  <ItemGroup>
4    <PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
5    <AvailableItemName Include="LolFxCompile">
6      <Targets>LolFxCompile</Targets>
7    </AvailableItemName>
8  </ItemGroup>
9
10  <PropertyGroup>
11    <ComputeCompileInputsTargets>
12      $(ComputeCompileInputsTargets);
13      ComputeLolFxCompileOutput;
14    </ComputeCompileInputsTargets>
15  </PropertyGroup>
16
17  <UsingTask
18    TaskName="LolFxCompile"
19    TaskFactory="XamlTaskFactory"
20    AssemblyName="Microsoft.Build.Tasks.v4.0">
21    <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
22  </UsingTask>
23
24  <Target
25    Name="LolFxCompile"
26    BeforeTargets="$(LolFxCompileBeforeTargets)"
27    AfterTargets="$(LolFxCompileAfterTargets)"
28    Condition="'@(LolFxCompile)' != ''"
29    DependsOnTargets="$(LolFxCompileDependsOn);ComputeLolFxCompileOutput"
30    Outputs="@(LolFxCompile-&gt;Metadata('CompileOut')-&gt;Distinct())"
31    Inputs="@(LolFxCompile);%(LolFxCompile.AdditionalDependencies);$(MSBuildProjectFile)">
32    <ItemGroup
33      Condition="'@(SelectedFiles)' != ''">
34      <LolFxCompile
35        Remove="@(LolFxCompile)"
36        Condition="'%(Identity)' != '@(SelectedFiles)'" />
37    </ItemGroup>
38    <ItemGroup>
39      <LolFxCompile_tlog
40        Include="%(LolFxCompile.Outputs)"
41        Condition="'%(LolFxCompile.Outputs)' != '' and '%(LolFxCompile.ExcludedFromBuild)' != 'true'">
42        <Source>@(LolFxCompile, '|')</Source>
43      </LolFxCompile_tlog>
44    </ItemGroup>
45    <Message
46      Importance="High"
47      Text="%(LolFxCompile.ExecutionDescription)" />
48    <WriteLinesToFile
49      Condition="'@(LolFxCompile_tlog)' != '' and '%(LolFxCompile_tlog.ExcludedFromBuild)' != 'true'"
50      File="$(IntDir)$(ProjectName).write.1.tlog"
51      Lines="^%(LolFxCompile_tlog.Source);@(LolFxCompile_tlog-&gt;'%(Fullpath)')" />
52    <ItemGroup>
53      <LolFxCompile>
54      </LolFxCompile>
55    </ItemGroup>
56    <LolFxCompile
57      Condition="'@(LolFxCompile)' != '' and '%(LolFxCompile.ExcludedFromBuild)' != 'true'"
58      CommandLineTemplate="%(LolFxCompile.CommandLineTemplate)"
59      Outputs="%(LolFxCompile.Outputs)"
60      IntDir="$(IntDir)"
61      FileName="%(FileName)"
62      Inputs="@(LolFxCompile)" />
63  </Target>
64
65
66  <Target Name="ComputeLolFxCompileOutput" Condition="'@(LolFxCompile)' != ''">
67    <ItemGroup>
68      <ClCompile Include="@(LolFxCompile->Metadata('CompileOut')->Distinct()->ClearMetadata())" Condition="'%(LolFxCompile.ExcludedFromBuild)' != 'true'">
69        <CompileAs>CompileAsC</CompileAs>
70      </ClCompile>
71      <ClCompile Include="%(LolFxCompile.Outputs)" />
72    </ItemGroup>
73    <ItemGroup>
74      <LolFxCompile>
75        <CompileOut>$(IntDir)\%(FileName).lolfx.cpp</CompileOut>
76      </LolFxCompile>
77    </ItemGroup>
78  </Target>
79
80</Project>
Note: See TracBrowser for help on using the repository browser.