Update buck build in Visual Studio

Summary:
- Always launch buck build for Build, but copy native library when it was changed
- Rename Facebook.Yoga.Mac.Test to Facebook.Yoga.Mac.Sample
- Add Facebook.Yoga.Mac.Tests for NUnit test.
  - "Run Unit Tests" menu item was activated for the target, but Mono still can't find libyoga.dylib
Closes https://github.com/facebook/yoga/pull/332

Reviewed By: emilsjolander

Differential Revision: D4408799

Pulled By: splhack

fbshipit-source-id: b3f5f9ebd8265cc152ca859176afbf54efa8f170
This commit is contained in:
Kazuki Sakamoto
2017-01-12 10:23:41 -08:00
committed by Facebook Github Bot
parent adb81e2a1e
commit c536ab214d
17 changed files with 189 additions and 39 deletions

View File

@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CompileDependsOn>Buck;CopyInNativeLib;$(CompileDependsOn)</CompileDependsOn>
</PropertyGroup>
<Target Name="Buck">
<Exec WorkingDirectory="$(OutDir)" Command="buck build //csharp:yoganet-ios" />
</Target>
<!-- The # and , in this path does not play nice with the binding project logic, so make a copy -->
<Target Name="CopyInNativeLib" Inputs="..\..\..\buck-out\gen\csharp\yoganet-ios\libyoga.a" Outputs="$(ProjectDir)libyoga.a">
<Copy SourceFiles="..\..\..\buck-out\gen\csharp\yoganet-ios\libyoga.a" DestinationFiles="$(ProjectDir)/libyoga.a" />
</Target>
<CompileDependsOn>NativeLibrary;$(CompileDependsOn)</CompileDependsOn>
</PropertyGroup>
<Target Name="NativeLibrary" Outputs="$(ProjectDir)libyoga.a">
<Exec WorkingDirectory="$(ProjectDir)" Command="$(ProjectDir)../../Mac/buck-build.sh //csharp:yoganet-ios" />
<Copy SourceFiles="$(ProjectDir)..\..\..\buck-out\gen\csharp\yoganet-ios\libyoga.a" DestinationFiles="$(ProjectDir)libyoga.a" SkipUnchangedFiles="true" />
</Target>
</Project>