|
11 | 11 | <ItemGroup> |
12 | 12 | <CefSharpCommonBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" /> |
13 | 13 | <CefSharpCommonBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" /> |
| 14 | + <CefSharpCommonBinariesAnyCpu Include="$(MSBuildThisFileDirectory)..\CefSharp\**\*.*" /> |
14 | 15 | </ItemGroup> |
15 | 16 |
|
16 | 17 | <PropertyGroup> |
17 | | - <CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' ">$(TargetDir)</CefSharpTargetDir> |
| 18 | + <CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' "></CefSharpTargetDir> |
18 | 19 | </PropertyGroup> |
19 | 20 |
|
20 | | - <Target Name="CefSharpCopyLibs86" BeforeTargets="BeforeBuild" Condition="('$(Platform)' == 'x86') OR ('$(Platform)' == 'Win32')"> |
21 | | - <Message Importance="high" Text="Copying cef.redist x86 files" /> |
22 | | - <Copy SourceFiles="@(CefRedist32)" DestinationFiles="@(CefRedist32->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" /> |
23 | | - |
24 | | - <Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x86 to $(CefSharpTargetDir)" /> |
25 | | - <Copy SourceFiles="@(CefSharpCommonBinaries32)" DestinationFolder="$(CefSharpTargetDir)" SkipUnchangedFiles="true" /> |
26 | | - </Target> |
27 | | - |
28 | | - <Target Name="CefSharpCopyLibs64" BeforeTargets="BeforeBuild" Condition="'$(Platform)' == 'x64'"> |
29 | | - <Message Importance="high" Text="Copying cef.redist x64 files" /> |
30 | | - <Copy SourceFiles="@(CefRedist64)" DestinationFiles="@(CefRedist64->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" /> |
31 | | - |
32 | | - <Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x64 to $(CefSharpTargetDir)" /> |
33 | | - <Copy SourceFiles="@(CefSharpCommonBinaries64)" DestinationFolder="$(CefSharpTargetDir)" SkipUnchangedFiles="true" /> |
34 | | - </Target> |
35 | | - |
36 | | - <Target Name="CefSharpCopyLibsAnyCPU" BeforeTargets="BeforeBuild" Condition="'$(Platform)' == 'AnyCPU'"> |
37 | | - <Message Importance="high" Text="Copying cef.redist x86 files" /> |
38 | | - <Copy SourceFiles="@(CefRedist32)" DestinationFiles="@(CefRedist32->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" /> |
| 21 | + <!-- |
| 22 | + These item groups should be in the .props file, unfortunately Nuget 2.8.x doesn't gurantee the |
| 23 | + correct ordering .props imports, which we require as this depends on the cef.redist packages |
| 24 | + exporting an ItemGroup |
| 25 | + --> |
| 26 | + |
| 27 | + <ItemGroup Condition="('$(Platform)' == 'x86') OR ('$(Platform)' == 'Win32')"> |
| 28 | + <None Include="@(CefRedist32)"> |
| 29 | + <Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link> |
| 30 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 31 | + </None> |
| 32 | + <None Include="@(CefSharpCommonBinaries32)"> |
| 33 | + <Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link> |
| 34 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 35 | + </None> |
| 36 | + </ItemGroup> |
39 | 37 |
|
40 | | - <Message Importance="high" Text="Copying cef.redist x64 files" /> |
41 | | - <Copy SourceFiles="@(CefRedist64)" DestinationFiles="@(CefRedist64->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" /> |
| 38 | + <ItemGroup Condition="'$(Platform)' == 'x64'"> |
| 39 | + <None Include="@(CefRedist64)"> |
| 40 | + <Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link> |
| 41 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 42 | + </None> |
| 43 | + <None Include="@(CefSharpCommonBinaries64)"> |
| 44 | + <Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link> |
| 45 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 46 | + </None> |
| 47 | + </ItemGroup> |
42 | 48 |
|
43 | | - <Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x86 to $(CefSharpTargetDir)\x86" /> |
44 | | - <Copy SourceFiles="@(CefSharpCommonBinaries32)" DestinationFolder="$(CefSharpTargetDir)\x86" SkipUnchangedFiles="true" /> |
45 | | - <Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x64 to $(CefSharpTargetDir)\x64" /> |
46 | | - <Copy SourceFiles="@(CefSharpCommonBinaries64)" DestinationFolder="$(CefSharpTargetDir)\x64" SkipUnchangedFiles="true" /> |
47 | | - </Target> |
| 49 | + <ItemGroup Condition="'$(Platform)' == 'AnyCPU'"> |
| 50 | + <None Include="@(CefRedist32)"> |
| 51 | + <Link>$(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension)</Link> |
| 52 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 53 | + </None> |
| 54 | + <None Include="@(CefRedist64)"> |
| 55 | + <Link>$(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension)</Link> |
| 56 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 57 | + </None> |
| 58 | + <None Include="@(CefSharpCommonBinariesAnyCpu)"> |
| 59 | + <Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link> |
| 60 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 61 | + </None> |
| 62 | + </ItemGroup> |
48 | 63 | </Project> |
0 commit comments