2016-09-18 20:50:08 -07:00
|
|
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2016-10-31 13:32:58 -07:00
|
|
|
|
|
|
|
<Target Name="RuntimeLibraryAnalyze" BeforeTargets="GetClCommandLines;ClCompile">
|
|
|
|
<PropertyGroup>
|
|
|
|
<VcpkgRuntimeLibrary Condition="'%(ClCompile.RuntimeLibrary)' == ''"></VcpkgRuntimeLibrary>
|
|
|
|
<VcpkgRuntimeLibrary Condition="'%(ClCompile.RuntimeLibrary)' == 'MultiThreadedDebugDLL'"></VcpkgRuntimeLibrary>
|
|
|
|
<VcpkgRuntimeLibrary Condition="'%(ClCompile.RuntimeLibrary)' == 'MultiThreadedDebug'">-static</VcpkgRuntimeLibrary>
|
|
|
|
<VcpkgRuntimeLibrary Condition="'%(ClCompile.RuntimeLibrary)' == 'MultiThreadedDLL'"></VcpkgRuntimeLibrary>
|
|
|
|
<VcpkgRuntimeLibrary Condition="'%(ClCompile.RuntimeLibrary)' == 'MultiThreaded'">-static</VcpkgRuntimeLibrary>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'Win32||'">
|
|
|
|
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
|
|
|
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x86-windows$(VcpkgRuntimeLibrary)</VcpkgTriplet>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Message Text="BeforeCompile: RuntimeLibrary=[%(ClCompile.RuntimeLibrary)]" />
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'Win32|Windows Store|10.0'">
|
|
|
|
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
|
|
|
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x86-uwp$(VcpkgRuntimeLibrary)</VcpkgTriplet>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'x64||'">
|
|
|
|
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
|
|
|
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x64-windows$(VcpkgRuntimeLibrary)</VcpkgTriplet>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'x64|Windows Store|10.0'">
|
|
|
|
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
|
|
|
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x64-uwp$(VcpkgRuntimeLibrary)</VcpkgTriplet>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'arm|Windows Store|10.0'">
|
|
|
|
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
|
|
|
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">arm-uwp$(VcpkgRuntimeLibrary)</VcpkgTriplet>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(VcpkgEnabled)' == 'true'">
|
|
|
|
<VcpkgConfiguration Condition="'$(VcpkgConfiguration)' == ''">$(Configuration)</VcpkgConfiguration>
|
|
|
|
<VcpkgRoot Condition="'$(VcpkgRoot)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\installed\$(VcpkgTriplet)\</VcpkgRoot>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Message Text="Selecting VcpkgTriplet: $(VcpkgTriplet)"/>
|
|
|
|
<Message Text="Selecting VcpkgRoot: $(VcpkgRoot)"/>
|
|
|
|
<ItemGroup Condition="'$(VcpkgEnabled)' == 'true'">
|
|
|
|
<Link>
|
|
|
|
<AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Debug'">$(VcpkgRoot)debug\lib\*.lib;%(Link.AdditionalDependencies)</AdditionalDependencies>
|
|
|
|
<AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Release'">$(VcpkgRoot)lib\*.lib;%(Link.AdditionalDependencies)</AdditionalDependencies>
|
|
|
|
</Link>
|
|
|
|
<ClCompile>
|
|
|
|
<AdditionalIncludeDirectories>$(VcpkgRoot)include;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
</ClCompile>
|
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
2016-09-18 20:50:08 -07:00
|
|
|
|
2016-10-28 18:58:39 -07:00
|
|
|
<Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup" Condition="'$(VcpkgEnabled)' == 'true' and '$(OutputType)' == 'exe'">
|
2016-09-18 20:50:08 -07:00
|
|
|
<WriteLinesToFile
|
|
|
|
File="$(TLogLocation)$(ProjectName).write.1u.tlog"
|
|
|
|
Lines="^$(OutputPath)$(TargetName).$(OutputType);" Encoding="Unicode"/>
|
2016-10-28 18:58:39 -07:00
|
|
|
<Exec Condition="'$(VcpkgConfiguration)' == 'Debug'"
|
|
|
|
Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(OutputPath)$(TargetName).$(OutputType)%22 %22$(VcpkgRoot)debug\bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
|
2016-09-18 20:50:08 -07:00
|
|
|
ConsoleToMSBuild="true">
|
|
|
|
<Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" />
|
|
|
|
</Exec>
|
2016-10-28 18:58:39 -07:00
|
|
|
<Exec Condition="'$(VcpkgConfiguration)' == 'Release'"
|
|
|
|
Command="powershell.exe -ExecutionPolicy Unrestricted -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(OutputPath)$(TargetName).$(OutputType)%22 %22$(VcpkgRoot)bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22"
|
2016-09-18 20:50:08 -07:00
|
|
|
ConsoleToMSBuild="true">
|
|
|
|
<Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" />
|
|
|
|
</Exec>
|
|
|
|
</Target>
|
|
|
|
</Project>
|