wangzhibo
2023-10-31 86070cd00485c47a2c5c3ffa4a9bae6648dd05c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--
    Files are no longer copied as part of this targets file.
    For projects other than CefSharp define a target to copy the files.
    Checkout the CefSharp.Common.targets file for an example
    -->
  
  <!--
    Using wildcard matching as per https://stackoverflow.com/a/17252671
    -->  
  <ItemGroup>
    <CefRedist64 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
  </ItemGroup>
  
  <Target Name="CefRedist64CopyResources">
    <PropertyGroup>
      <CefRedist64TargetDir Condition="'$(CefRedist64TargetDir)' == ''">$(TargetDir)</CefRedist64TargetDir>
    </PropertyGroup>
    <!--
    Cannot gurantee access to the main CefRedist64 ItemGroup here
    so we create a duplicate inside our target.
    https://github.com/dotnet/project-system/issues/4158
    -->
    <ItemGroup>
      <_CefRedist64 Include="$(MSBuildThisFileDirectory)..\CEF\**\*.*" />
    </ItemGroup>
    <Message Importance="high" Text="Copying CEF Redist x64 files from $(MSBuildThisFileDirectory)..\CEF to $(CefRedist64TargetDir)" />
    <Copy SourceFiles="@(_CefRedist64)" DestinationFiles="@(_CefRedist64->'$(CefRedist64TargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
  </Target>
</Project>