LibMiniDisplay.targets
changeset 36 3b94d0640115
child 38 10d8128ccc60
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/LibMiniDisplay.targets	Wed May 06 21:03:53 2015 +0200
     1.3 @@ -0,0 +1,33 @@
     1.4 +<!--
     1.5 +***********************************************************************************************
     1.6 +LibMiniDisplay.targets
     1.7 +
     1.8 +WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
     1.9 +          created a backup copy.  Incorrect changes to this file will make it
    1.10 +          impossible to load or build your projects from the command-line or the IDE.
    1.11 +
    1.12 +Copyright (c) Stephane Lenclud. All rights reserved.
    1.13 +***********************************************************************************************
    1.14 +-->
    1.15 +
    1.16 +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    1.17 +  <PropertyGroup>
    1.18 +    <LibMiniDisplayDllPath Condition=" '$(LibMiniDisplayPath)' == '' ">$(MSBuildThisFileDirectory)..\native\$(Platform)\MiniDisplay.dll</LibMiniDisplayDllPath>
    1.19 +  </PropertyGroup>  
    1.20 +
    1.21 +  <Target Name="CopyLibMiniDisplayNativeReference">
    1.22 +    <!-- Make sure the platform has been set appropriately before trying to copy the native reference. -->
    1.23 +    <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)') " 
    1.24 +           File="$(MSBuildProjectFile)"/>
    1.25 +    
    1.26 +    <Copy SourceFiles="$(LibMiniDisplayDllPath)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true"/>
    1.27 +  </Target>
    1.28 +
    1.29 +  <PropertyGroup>
    1.30 +    <AfterBuildDependsOn>
    1.31 +      CopyLibMiniDisplayNativeReference;
    1.32 +    </AfterBuildDependsOn>
    1.33 +  </PropertyGroup>
    1.34 +  
    1.35 +  <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn)"/>
    1.36 +</Project>
    1.37 \ No newline at end of file