0230204_FZLH_upperpc/fuqing/packages/VideoLAN.LibVLC.Windows.3.0.11/build/VideoLAN.LibVLC.Windows.targets

52 lines
3.8 KiB
Plaintext
Raw Permalink Normal View History

2023-07-26 01:26:19 +00:00
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VlcWindowsX64TargetDir Condition=" '$(VlcWindowsX64TargetDir)' == '' ">libvlc\win-x64</VlcWindowsX64TargetDir>
<VlcWindowsX86TargetDir Condition=" '$(VlcWindowsX86TargetDir)' == '' ">libvlc\win-x86</VlcWindowsX86TargetDir>
<VlcWindowsX64Enabled Condition="'$(VlcWindowsX64Enabled)' == '' AND ('$(Platform)' == 'x64' OR '$(Platform)' == 'AnyCPU')">true</VlcWindowsX64Enabled>
<VlcWindowsX86Enabled Condition="'$(VlcWindowsX86Enabled)' == '' AND ('$(Platform)' == 'x86' OR '$(Platform)' == 'AnyCPU')">true</VlcWindowsX86Enabled>
</PropertyGroup>
<ItemGroup>
<!-- If no VlcWindows[...]IncludeFiles was declared previously, include all plugins by default by specifying ** (escaped, so %2A%2A) -->
<VlcWindowsX64IncludeFiles Condition="'@(VlcWindowsX64IncludeFiles)'==''" Include="libvlc.%2A;libvlccore.%2A;hrtfs\%2A%2A;locale\%2A%2A;lua\%2A%2A;plugins\%2A%2A" />
<VlcWindowsX86IncludeFiles Condition="'@(VlcWindowsX86IncludeFiles)'==''" Include="libvlc.%2A;libvlccore.%2A;hrtfs\%2A%2A;locale\%2A%2A;lua\%2A%2A;plugins\%2A%2A" />
</ItemGroup>
<Target Name="CollectVlcFilesToCopyWindows" BeforeTargets="BeforeBuild">
<!-- We need a target in order to make batching work -->
<!-- Some useful links to understand how it works:
http://sedotech.com/Resources#Batching (4 parts of excellent explanation of Batching. Link 2 is dead, but can be found in parts 3 and above)
http://sedodream.com/2010/10/21/MSBuildFilterListTake2.aspx
-->
<!-- First, transform the escaped, relative, platform-independant file path into real path, relative to 32/64 folders -->
<!-- x64 -->
<ItemGroup Condition="'$(VlcWindowsX64Enabled)' == 'true'">
<!-- Expand selectors and compute absolute paths for include, exclude and MainLibraries -->
<VlcWindowsX64IncludeFilesFullPath Include="$([MSBuild]::Unescape($(MSBuildThisFileDirectory)..\build\x64\%(VlcWindowsX64IncludeFiles.Identity)))" />
<VlcWindowsX64ExcludeFilesFullPath Include="$([MSBuild]::Unescape($(MSBuildThisFileDirectory)..\build\x64\%(VlcWindowsX64ExcludeFiles.Identity)))" Condition="'%(VlcWindowsX64ExcludeFiles.Identity)'!=''" />
<!-- We have gathered all the full path of what should be copied and what should be skipped, let's include that as Content that gets copied -->
<Content Include="@(VlcWindowsX64IncludeFilesFullPath)" Exclude="@(VlcWindowsX64ExcludeFilesFullPath)">
<Link>$(VlcWindowsX64TargetDir)\$([MSBuild]::MakeRelative($(MSBuildThisFileDirectory)..\build\x64\, %(FullPath)))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<!-- x86 -->
<ItemGroup Condition="'$(VlcWindowsX86Enabled)' == 'true'">
<!-- Expand selectors and compute absolute paths for include, exclude and MainLibraries -->
<VlcWindowsX86IncludeFilesFullPath Include="$([MSBuild]::Unescape($(MSBuildThisFileDirectory)..\build\x86\%(VlcWindowsX86IncludeFiles.Identity)))" />
<VlcWindowsX86ExcludeFilesFullPath Include="$([MSBuild]::Unescape($(MSBuildThisFileDirectory)..\build\x86\%(VlcWindowsX86ExcludeFiles.Identity)))" Condition="'%(VlcWindowsX86ExcludeFiles.Identity)'!=''" />
<!-- We have gathered all the full path of what should be copied and what should be skipped, let's include that as Content that gets copied -->
<Content Include="@(VlcWindowsX86IncludeFilesFullPath)" Exclude="@(VlcWindowsX86ExcludeFilesFullPath)">
<Link>$(VlcWindowsX86TargetDir)\$([MSBuild]::MakeRelative($(MSBuildThisFileDirectory)..\build\x86\, %(FullPath)))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Target>
</Project>