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
echo ; &gt;&gt; "%D%"</CommandLineTemplate>
<ExecutionDescription>Compiling with Lol Fx Build Rule...</ExecutionDescription>
<Outputs>$(IntDir)%(FileName)%(Extension).cpp</Outputs>
<ExecutionDescription>%(FileName)%(Extension)</ExecutionDescription>
</LolFxCompile>
</ItemDefinitionGroup>
</Project>

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

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

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

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

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

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

<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>
<LolFxCompile>
<CompileOut>$(IntDir)\%(FileName).lolfx.cpp</CompileOut>
</LolFxCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="%(LolFxCompile.Outputs)" />
</ItemGroup>
</Target>

</Project>

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

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


Loading…
Cancel
Save