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.
StephaneLenclud@36
     1
<!--
StephaneLenclud@36
     2
***********************************************************************************************
StephaneLenclud@36
     3
LibMiniDisplay.targets
StephaneLenclud@36
     4
StephaneLenclud@36
     5
WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
StephaneLenclud@36
     6
          created a backup copy.  Incorrect changes to this file will make it
StephaneLenclud@36
     7
          impossible to load or build your projects from the command-line or the IDE.
StephaneLenclud@36
     8
StephaneLenclud@36
     9
Copyright (c) Stephane Lenclud. All rights reserved.
StephaneLenclud@36
    10
***********************************************************************************************
StephaneLenclud@36
    11
-->
StephaneLenclud@36
    12
StephaneLenclud@36
    13
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
StephaneLenclud@36
    14
  <PropertyGroup>
StephaneLenclud@36
    15
    <LibMiniDisplayDllPath Condition=" '$(LibMiniDisplayPath)' == '' ">$(MSBuildThisFileDirectory)..\native\$(Platform)\MiniDisplay.dll</LibMiniDisplayDllPath>
StephaneLenclud@36
    16
  </PropertyGroup>  
StephaneLenclud@36
    17
StephaneLenclud@36
    18
  <Target Name="CopyLibMiniDisplayNativeReference">
StephaneLenclud@36
    19
    <!-- Make sure the platform has been set appropriately before trying to copy the native reference. -->
StephaneLenclud@36
    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)') " 
StephaneLenclud@36
    21
           File="$(MSBuildProjectFile)"/>
StephaneLenclud@36
    22
    
StephaneLenclud@36
    23
    <Copy SourceFiles="$(LibMiniDisplayDllPath)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true"/>
StephaneLenclud@36
    24
  </Target>
StephaneLenclud@36
    25
StephaneLenclud@36
    26
  <PropertyGroup>
StephaneLenclud@36
    27
    <AfterBuildDependsOn>
StephaneLenclud@36
    28
      CopyLibMiniDisplayNativeReference;
StephaneLenclud@36
    29
    </AfterBuildDependsOn>
StephaneLenclud@36
    30
  </PropertyGroup>
StephaneLenclud@36
    31
  
StephaneLenclud@36
    32
  <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn)"/>
StephaneLenclud@36
    33
</Project>