mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-12-13 22:28:36 +00:00
[integration] Enable static lib integration. Also, detect .vcpkg-root
This commit is contained in:
parent
71594b6bef
commit
d58f0c6680
@ -1,44 +1,58 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'Win32||'">
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x86-windows</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'Win32|Windows Store|10.0'">
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x86-uwp</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<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)' == 'x64||'">
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x64-windows</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'Win32||'">
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x86-windows$(VcpkgRuntimeLibrary)</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'x64|Windows Store|10.0'">
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x64-uwp</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<Message Text="BeforeCompile: RuntimeLibrary=[%(ClCompile.RuntimeLibrary)]" />
|
||||
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'arm|Windows Store|10.0'">
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">arm-uwp</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<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="'$(VcpkgEnabled)' == 'true'">
|
||||
<VcpkgConfiguration Condition="'$(VcpkgConfiguration)' == ''">$(Configuration)</VcpkgConfiguration>
|
||||
<!-- Expected to ..\..\..\ over scripts\buildsystems\msbuild -->
|
||||
<VcpkgRoot Condition="'$(VcpkgRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\installed\$(VcpkgTriplet)\</VcpkgRoot>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)|$(ApplicationType)|$(ApplicationTypeRevision)' == 'x64||'">
|
||||
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
||||
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">x64-windows$(VcpkgRuntimeLibrary)</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup Condition="'$(VcpkgEnabled)' == 'true'">
|
||||
<Link>
|
||||
<AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Debug'">$(VcpkgRoot)debug\lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Release'">$(VcpkgRoot)lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(VcpkgRoot)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<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>
|
||||
|
||||
<Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup" Condition="'$(VcpkgEnabled)' == 'true' and '$(OutputType)' == 'exe'">
|
||||
<WriteLinesToFile
|
||||
|
Loading…
Reference in New Issue
Block a user