Update C# wrapper to support both desktop and UWP projects
Summary: The C# wrapper project has been changed to a NETStandard (1.1) PCL allowing it to be consumed by any project targeting .NET4.5 or greater including .NETCore and UWP projects... The C# wrapper uses P/Invoke to call into the Native Yoga DLL... The "Yoga" C++ project has been updated to support ARM builds... Added the ability to generate nuget packages for the C# wrapper that supports copying the native DLLs to the target output directory. Closes: https://github.com/facebook/yoga/pull/283 Reviewed By: splhack, emilsjolander Differential Revision: D4381455 Pulled By: JoelMarcey fbshipit-source-id: e6dc4190caa824ac63d5d5ee2eb4c7914efbb00f
This commit is contained in:
committed by
Facebook Github Bot
parent
6bcf0e3a50
commit
bf6602ebff
38
csharp/nuget/Facebook.Yoga.Native.nuspec
Normal file
38
csharp/nuget/Facebook.Yoga.Native.nuspec
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Facebook.Yoga.Native</id>
|
||||
<version>1.0.1-pre</version>
|
||||
<title>Facebook.Yoga.Native</title>
|
||||
<authors>Facebook</authors>
|
||||
<owners>Facebook</owners>
|
||||
<licenseUrl>https://github.com/facebook/css-layout/blob/master/LICENSE</licenseUrl>
|
||||
<projectUrl>https://github.com/facebook/css-layout</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>A subset of CSS's flexbox layout algorithm and box model.</description>
|
||||
<copyright>Copyright 2016 Facebook</copyright>
|
||||
<tags>native flexbox flex-box css layout css-layout yoga facebook</tags>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETStandard1.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
|
||||
<files>
|
||||
<!-- build -->
|
||||
<file src="Facebook.Yoga.Native.targets" target="build\netstandard1.0"/>
|
||||
|
||||
<!-- lib -->
|
||||
<file src="_._" target="lib\netstandard1.0"/>
|
||||
|
||||
<!-- Native -->
|
||||
<file src="..\Yoga\bin\x86\Release\Yoga.dll" target="runtimes\win-x86\native"/>
|
||||
<file src="..\Yoga\bin\x86\Release\Yoga.pdb" target="runtimes\win-x86\native"/>
|
||||
|
||||
<file src="..\Yoga\bin\x64\Release\Yoga.dll" target="runtimes\win-x64\native"/>
|
||||
<file src="..\Yoga\bin\x64\Release\Yoga.pdb" target="runtimes\win-x64\native"/>
|
||||
|
||||
<file src="..\Yoga\bin\ARM\Release\Yoga.dll" target="runtimes\win8-arm\native"/>
|
||||
<file src="..\Yoga\bin\ARM\Release\Yoga.pdb" target="runtimes\win8-arm\native"/>
|
||||
</files>
|
||||
|
||||
</package>
|
36
csharp/nuget/Facebook.Yoga.Native.targets
Normal file
36
csharp/nuget/Facebook.Yoga.Native.targets
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'AnyCPU'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\*">
|
||||
<Link>x86\%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\*">
|
||||
<Link>x64\%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'x86'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'x64'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'ARM'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win8-arm\native\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
46
csharp/nuget/Facebook.Yoga.nuspec
Normal file
46
csharp/nuget/Facebook.Yoga.nuspec
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Facebook.Yoga</id>
|
||||
<version>1.0.1-pre</version>
|
||||
<title>Facebook.Yoga</title>
|
||||
<authors>Facebook</authors>
|
||||
<owners>Facebook</owners>
|
||||
<licenseUrl>https://github.com/facebook/css-layout/blob/master/LICENSE</licenseUrl>
|
||||
<projectUrl>https://github.com/facebook/css-layout</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>A subset of CSS's flexbox layout algorithm and box model.</description>
|
||||
<copyright>Copyright 2016 Facebook</copyright>
|
||||
<tags>flexbox flex-box css layout css-layout yoga facebook native</tags>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETStandard1.1" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<!-- build -->
|
||||
<file src="Facebook.Yoga.targets" target="build\netstandard"/>
|
||||
|
||||
<!-- lib -->
|
||||
<file src="..\Windows\Facebook.Yoga\bin\Release\Facebook.Yoga.dll" target="lib\netstandard"/>
|
||||
|
||||
<!-- runtimes -->
|
||||
<file src="..\Windows\Facebook.Yoga\bin\x86\Release\Facebook.Yoga.dll" target="runtimes\win-x86\lib\netstandard"/>
|
||||
<file src="..\Windows\Facebook.Yoga\bin\x86\Release\Facebook.Yoga.pdb" target="runtimes\win-x86\lib\netstandard"/>
|
||||
|
||||
<file src="..\Windows\Facebook.Yoga\bin\x64\Release\Facebook.Yoga.dll" target="runtimes\win-x64\lib\netstandard"/>
|
||||
<file src="..\Windows\Facebook.Yoga\bin\x64\Release\Facebook.Yoga.pdb" target="runtimes\win-x64\lib\netstandard"/>
|
||||
|
||||
<file src="..\Windows\Facebook.Yoga\bin\ARM\Release\Facebook.Yoga.dll" target="runtimes\win8-arm\lib\netstandard"/>
|
||||
<file src="..\Windows\Facebook.Yoga\bin\ARM\Release\Facebook.Yoga.pdb" target="runtimes\win8-arm\lib\netstandard"/>
|
||||
|
||||
<!-- Native -->
|
||||
<file src="..\Yoga\bin\x86\Release\Yoga.dll" target="runtimes\win-x86\native"/>
|
||||
<file src="..\Yoga\bin\x86\Release\Yoga.pdb" target="runtimes\win-x86\native"/>
|
||||
|
||||
<file src="..\Yoga\bin\x64\Release\Yoga.dll" target="runtimes\win-x64\native"/>
|
||||
<file src="..\Yoga\bin\x64\Release\Yoga.pdb" target="runtimes\win-x64\native"/>
|
||||
|
||||
<file src="..\Yoga\bin\ARM\Release\Yoga.dll" target="runtimes\win8-arm\native"/>
|
||||
<file src="..\Yoga\bin\ARM\Release\Yoga.pdb" target="runtimes\win8-arm\native"/>
|
||||
</files>
|
||||
</package>
|
51
csharp/nuget/Facebook.Yoga.targets
Normal file
51
csharp/nuget/Facebook.Yoga.targets
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'AnyCPU'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\*">
|
||||
<Link>x86\%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\*">
|
||||
<Link>x64\%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'x86'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\lib\netstandard\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'x64'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\lib\netstandard\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" (Exists('packages.config') Or Exists('packages.$(MSBuildProjectName).config')) And '$(Platform)' == 'ARM'">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win8-arm\lib\netstandard\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\..\runtimes\win8-arm\native\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>False</Visible>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
0
csharp/nuget/_._
Normal file
0
csharp/nuget/_._
Normal file
Reference in New Issue
Block a user