LibMiniDisplay.targets
changeset 38 10d8128ccc60
parent 36 3b94d0640115
child 39 c32f4955c166
     1.1 --- a/LibMiniDisplay.targets	Wed May 06 21:25:49 2015 +0200
     1.2 +++ b/LibMiniDisplay.targets	Fri Sep 25 19:22:44 2015 +0200
     1.3 @@ -1,33 +1,29 @@
     1.4 +<?xml version="1.0" encoding="utf-8"?>
     1.5 +
     1.6  <!--
     1.7 -***********************************************************************************************
     1.8 -LibMiniDisplay.targets
     1.9 + Copyright (C) 2015 Stephane Lenclud.
    1.10  
    1.11 -WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
    1.12 -          created a backup copy.  Incorrect changes to this file will make it
    1.13 -          impossible to load or build your projects from the command-line or the IDE.
    1.14 + This file is part of MiniDisplay.
    1.15  
    1.16 -Copyright (c) Stephane Lenclud. All rights reserved.
    1.17 -***********************************************************************************************
    1.18 + MiniDisplay is free software: you can redistribute it and/or modify
    1.19 + it under the terms of the GNU General Public License as published by
    1.20 + the Free Software Foundation, either version 3 of the License, or
    1.21 + (at your option) any later version.
    1.22 +
    1.23 + MiniDisplay is distributed in the hope that it will be useful,
    1.24 + but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.25 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.26 + GNU General Public License for more details.
    1.27 +
    1.28 + You should have received a copy of the GNU General Public License
    1.29 + along with MiniDisplay.  If not, see <http://www.gnu.org/licenses/>.
    1.30  -->
    1.31  
    1.32 -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    1.33 -  <PropertyGroup>
    1.34 -    <LibMiniDisplayDllPath Condition=" '$(LibMiniDisplayPath)' == '' ">$(MSBuildThisFileDirectory)..\native\$(Platform)\MiniDisplay.dll</LibMiniDisplayDllPath>
    1.35 -  </PropertyGroup>  
    1.36 -
    1.37 -  <Target Name="CopyLibMiniDisplayNativeReference">
    1.38 -    <!-- Make sure the platform has been set appropriately before trying to copy the native reference. -->
    1.39 -    <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.40 -           File="$(MSBuildProjectFile)"/>
    1.41 -    
    1.42 -    <Copy SourceFiles="$(LibMiniDisplayDllPath)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true"/>
    1.43 -  </Target>
    1.44 -
    1.45 -  <PropertyGroup>
    1.46 -    <AfterBuildDependsOn>
    1.47 -      CopyLibMiniDisplayNativeReference;
    1.48 -    </AfterBuildDependsOn>
    1.49 -  </PropertyGroup>
    1.50 -  
    1.51 -  <Target Name="AfterBuild" DependsOnTargets="$(AfterBuildDependsOn)"/>
    1.52 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    1.53 +    <ItemGroup>
    1.54 +        <None Include="$(MSBuildThisFileDirectory)\..\native\x86\MiniDisplay.dll">
    1.55 +            <Link>MiniDisplay.dll</Link>
    1.56 +            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.57 +        </None>
    1.58 +    </ItemGroup>
    1.59  </Project>
    1.60 \ No newline at end of file