Launch buck from Visual Studio (Xamarin Studio) for Mac and iOS

Summary:
Launch buck from Visual Studio before `CopyInNativeLib` in `CompileDependsOn`
- Mac `buck build //csharp:yoganet#default,shared`
- iOS `buck build //csharp:yoganet-ios`

Reviewed By: emilsjolander

Differential Revision: D4403163

fbshipit-source-id: 2e5fd3fd154ef53574129ac9cb834ae3a58f2466
This commit is contained in:
Kazuki Sakamoto
2017-01-11 07:42:42 -08:00
committed by Facebook Github Bot
parent a3d7d72421
commit c4a3e12add
2 changed files with 9 additions and 2 deletions

View File

@@ -1,9 +1,13 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CompileDependsOn>CopyInNativeLib;$(CompileDependsOn)</CompileDependsOn>
<CompileDependsOn>Buck;CopyInNativeLib;$(CompileDependsOn)</CompileDependsOn>
</PropertyGroup>
<Target Name="Buck">
<Exec WorkingDirectory="$(OutDir)" Command="buck build //csharp:yoganet#default,shared" />
</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#default,shared\libyoga.dylib" Outputs="$(ProjectDir)libyoga.dylib">
<Copy SourceFiles="..\..\buck-out\gen\csharp\yoganet#default,shared\libyoga.dylib" DestinationFiles="$(ProjectDir)/libyoga.dylib" />

View File

@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CompileDependsOn>CopyInNativeLib;$(CompileDependsOn)</CompileDependsOn>
<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" />