LibMiniDisplay.targets
author StephaneLenclud
Wed, 06 May 2015 21:03:53 +0200
changeset 36 3b94d0640115
child 38 10d8128ccc60
permissions -rw-r--r--
Adding C# interop project and NuGet package.
     1 <!--
     2 ***********************************************************************************************
     3 LibMiniDisplay.targets
     4 
     5 WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
     6           created a backup copy.  Incorrect changes to this file will make it
     7           impossible to load or build your projects from the command-line or the IDE.
     8 
     9 Copyright (c) Stephane Lenclud. All rights reserved.
    10 ***********************************************************************************************
    11 -->
    12 
    13 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    14   <PropertyGroup>
    15     <LibMiniDisplayDllPath Condition=" '$(LibMiniDisplayPath)' == '' ">$(MSBuildThisFileDirectory)..\native\$(Platform)\MiniDisplay.dll</LibMiniDisplayDllPath>
    16   </PropertyGroup>  
    17 
    18   <Target Name="CopyLibMiniDisplayNativeReference">
    19     <!-- Make sure the platform has been set appropriately before trying to copy the native reference. -->
    20     <Error Code="LH0001" Text="The project platform must be set to x86 or x64. Please change your target platform and try again." Condition=" !Exists('$(LibMiniDisplayDllPath)') " 
    21            File="$(MSBuildProjectFile)"/>
    22     
    23     <Copy SourceFiles="$(LibMiniDisplayDllPath)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true"/>
    24   </Target>
    25 
    26   <PropertyGroup>
    27     <AfterBuildDependsOn>
    28       CopyLibMiniDisplayNativeReference;
    29     </AfterBuildDependsOn>
    30   </PropertyGroup>
    31   
    32   <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn)"/>
    33 </Project>