9b0f41dfd425279258d70cc7d2b731efa47cbb1c
[platform/core/csapi/tizenfx.git] / externals / opentk.proj
1 <Project DefaultTargets="Build">
2
3 <Import Project="$(MSBuildThisFileDirectory)..\build\directories.props" />
4
5 <PropertyGroup>
6     <Configuration>Release</Configuration>
7 </PropertyGroup>
8
9 <PropertyGroup>
10     <OpenTKProjectDirectory>$(MSBuildThisFileDirectory)opentk\src\OpenTK\</OpenTKProjectDirectory>
11     <BindProjectDirectory>$(MSBuildThisFileDirectory)opentk\src\Generator.Bind\</BindProjectDirectory>
12     <RewriteProjectDirectory>$(MSBuildThisFileDirectory)opentk\src\Generator.Rewrite\</RewriteProjectDirectory>
13 </PropertyGroup>
14
15 <PropertyGroup>
16     <OpenTKProject>$(OpenTKProjectDirectory)OpenTK.Tizen.csproj</OpenTKProject>
17     <BindCmd>dotnet $(BindProjectDirectory)bin/$(Configuration)/netcoreapp2.0/Bind.dll</BindCmd>
18 </PropertyGroup>
19
20 <Target Name="BuildTools">
21     <ItemGroup>
22         <ProjectsToBuild Include="$(BindProjectDirectory)Generator.Bind.NETCore.csproj" />
23         <ProjectsToBuild Include="$(RewriteProjectDirectory)Generator.Rewrite.NETCore.csproj" />
24     </ItemGroup>
25     <MSBuild Projects="@(ProjectsToBuild)" Targets="Restore"
26              Properties="Configuration=$(Configuration);RestoreSources=$(RestoreSources)" />
27     <MSBuild Projects="@(ProjectsToBuild)" Targets="Build" Properties="Configuration=$(Configuration)" />
28 </Target>
29
30 <Target Name="BuildOpenTK">
31     <!-- Run Bind.exe -->
32     <Exec Command="$(BindCmd)" WorkingDirectory="$(MSBuildThisFileDirectory)opentk" />
33
34     <!-- Build OpenTK.dll -->
35     <MSBuild Projects="$(OpenTKProject)" Targets="Restore"
36              Properties="Configuration=$(Configuration);RestoreSources=$(RestoreSources)" />
37     <MSBuild Projects="$(OpenTKProject)" Targets="Build" Properties="Configuration=$(Configuration)" />
38
39     <!-- Copy outputs to Artifacts -->
40     <PropertyGroup>
41         <OpenTKOutputDirectory>$(OpenTKProjectDirectory)bin\$(Configuration)\netstandard2.0\</OpenTKOutputDirectory>
42     </PropertyGroup>
43     <ItemGroup>
44         <OpenTKOutputFiles Include="$(OpenTKOutputDirectory)OpenTK.dll" />
45         <OpenTKOutputFiles Include="$(OpenTKOutputDirectory)OpenTK.xml" />
46         <OpenTKOutputFiles Include="$(OpenTKOutputDirectory)OpenTK.pdb" />
47     </ItemGroup>
48     <Copy SourceFiles="@(OpenTKOutputFiles)" DestinationFolder="$(OutputExternalDir)" />
49 </Target>
50
51 <Target Name="PackOpenTK">
52     <MSBuild Projects="$(OpenTKProject)" Targets="Pack" Properties="Configuration=$(Configuration);NoBuild=True" />
53     <ItemGroup>
54         <OpenTKOutputPackFiles Include="$(OpenTKProjectDirectory)bin\$(Configuration)\OpenTK.Tizen.*.nupkg" />
55     </ItemGroup>
56     <Copy SourceFiles="@(OpenTKOutputPackFiles)" DestinationFolder="$(OutputBaseDir)" />
57 </Target>
58
59 <Target Name="Build"
60         DependsOnTargets="BuildTools;BuildOpenTK;PackOpenTK"
61         Condition="Exists('$(OpenTKProjectDirectory)')">
62 </Target>
63
64 </Project>