Browse Source

build: lolfx files are now properly linked into the static library

when building with Visual Studio.
legacy
Sam Hocevar sam 12 years ago
parent
commit
99d76565ae
3 changed files with 25 additions and 24 deletions
  1. +2
    -1
      win32/Lol.Fx.props
  2. +18
    -18
      win32/Lol.Fx.targets
  3. +5
    -5
      win32/Lol.Fx.xml

+ 2
- 1
win32/Lol.Fx.props View File

@@ -24,7 +24,8 @@ for /F "tokens=1,* delims=`" %%L in ('type "%(Fullpath)"') do (
) )
endlocal endlocal
echo ; &gt;&gt; "%D%"</CommandLineTemplate> echo ; &gt;&gt; "%D%"</CommandLineTemplate>
<ExecutionDescription>Compiling with Lol Fx Build Rule...</ExecutionDescription>
<Outputs>$(IntDir)%(FileName)%(Extension).cpp</Outputs>
<ExecutionDescription>%(FileName)%(Extension)</ExecutionDescription>
</LolFxCompile> </LolFxCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
</Project> </Project>

+ 18
- 18
win32/Lol.Fx.targets View File

@@ -1,19 +1,26 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<PropertyPageSchema
Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
<AvailableItemName
Include="LolFxCompile">
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
<AvailableItemName Include="LolFxCompile">
<Targets>LolFxCompile</Targets> <Targets>LolFxCompile</Targets>
</AvailableItemName> </AvailableItemName>
</ItemGroup> </ItemGroup>

<PropertyGroup>
<ComputeCompileInputsTargets>
$(ComputeCompileInputsTargets);
ComputeLolFxCompileOutput;
</ComputeCompileInputsTargets>
</PropertyGroup>

<UsingTask <UsingTask
TaskName="LolFxCompile" TaskName="LolFxCompile"
TaskFactory="XamlTaskFactory" TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0"> AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task> <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask> </UsingTask>

<Target <Target
Name="LolFxCompile" Name="LolFxCompile"
BeforeTargets="$(LolFxCompileBeforeTargets)" BeforeTargets="$(LolFxCompileBeforeTargets)"
@@ -49,32 +56,25 @@
<LolFxCompile <LolFxCompile
Condition="'@(LolFxCompile)' != '' and '%(LolFxCompile.ExcludedFromBuild)' != 'true'" Condition="'@(LolFxCompile)' != '' and '%(LolFxCompile.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(LolFxCompile.CommandLineTemplate)" CommandLineTemplate="%(LolFxCompile.CommandLineTemplate)"
Outputs="%(LolFxCompile.Outputs)"
IntDir="$(IntDir)" IntDir="$(IntDir)"
Outputs="$(Outputs)"
FileName="%(FileName)" FileName="%(FileName)"
Inputs="@(LolFxCompile)" /> Inputs="@(LolFxCompile)" />
</Target> </Target>


<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeLolFxCompileOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeLolFxCompileOutput;
</ComputeLibInputsTargets>
</PropertyGroup>


<Target Name="ComputeLolFxCompileOutput" Condition="'@(LolFxCompile)' != ''"> <Target Name="ComputeLolFxCompileOutput" Condition="'@(LolFxCompile)' != ''">
<ItemGroup>
<ClCompile Include="@(LolFxCompile->Metadata('CompileOut')->Distinct()->ClearMetadata())" Condition="'%(LolFxCompile.ExcludedFromBuild)' != 'true'">
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="%(LolFxCompile.Outputs)" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<LolFxCompile> <LolFxCompile>
<CompileOut>$(IntDir)\%(FileName).lolfx.cpp</CompileOut> <CompileOut>$(IntDir)\%(FileName).lolfx.cpp</CompileOut>
</LolFxCompile> </LolFxCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ClCompile Include="%(LolFxCompile.Outputs)" />
</ItemGroup>
</Target> </Target>


</Project> </Project>

+ 5
- 5
win32/Lol.Fx.xml View File

@@ -49,17 +49,17 @@
SourceType="Item" /> SourceType="Item" />
</StringListProperty.DataSource> </StringListProperty.DataSource>
</StringListProperty> </StringListProperty>
<StringListProperty
Name="Outputs"
DisplayName="Outputs"
Visible="False"
IncludeInCommandLine="False" />
<StringListProperty <StringListProperty
Name="FileName" Name="FileName"
Category="Command Line" Category="Command Line"
IsRequired="true" IsRequired="true"
Switch=" "> Switch=" ">
</StringListProperty> </StringListProperty>
<StringProperty
Name="Outputs"
Category="Command Line"
IsRequired="true"
Switch=" " />
<StringProperty <StringProperty
Name="CommandLineTemplate" Name="CommandLineTemplate"
DisplayName="Command Line" DisplayName="Command Line"


Loading…
Cancel
Save