mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-17 12:37:54 +08:00
97e7ac8d74
* Repair msbuild damage and workaround the way we integrate on VS2015. This is a fix for a pile of issues discovered by https://github.com/microsoft/vcpkg/pull/18906 * VS 2015 has a bug that the <VcpkgInstalledDir Condition="!$(VcpkgInstalledDir.EndsWith('\'))">$(VcpkgInstalledDir)\</VcpkgInstalledDir> dance we do to get a trailing slash is not applied correctly when VcpkgInstalledDir was edited in the same property group attempting to add the trailing slash. * We need a trailing slash on VcpkgInstalledDir at all times, but https://github.com/microsoft/vcpkg/pull/16173 damaged this by removing it from TreatAsLocalProperty. Add the right TreatAsLocalPropertys back. Add all such slash defenses to the top of the file just beneath, eliminating need to call Path::Combine and friends by following msbuild "directory properties have a trailing slash" convention. * Move VcpkgOSTarget and VcpkgPlatformTarget into the .targets, as they aren't intended to be overridable by users and don't appear in our selection dialog box(es). * Don't bother avoiding setting vcpkg properties when VcpkgEnabled is off; after all, VcpkgEnabled is itself a vcpkg property :). I left attempts to skip creating items since creating items can hit the disk. * Add _Z to several internal msbuild variables. * Move VcpkgApplocalDeps to the .props since it's a user setting. * Don't unconditionally use $(TLogLocation) because it is not set on 2015, and also it's per-project. * Fixed typo in docs "VcpkgInstalledDirectory", and document the limitation that it doesn't work in 2015. * In manifest mode, put the installed tree in a subdirectory including the triplet to make changing configurations faster. Known limitations: * If you change vcpkg.json without changing any .cpp files, we don't rebuild the dependencies even though we should. I don't know how to fix this but it doesn't appear to be a regression. * Fix .tlog handling. * Further defend against modified properties on VS2015. * Document more VS2015 limitations. * Remove TreatAsLocalProperty comment.
22 lines
1.6 KiB
XML
22 lines
1.6 KiB
XML
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<!-- Do not define derived properties here. This file may be imported once and some of the properties below may be overridden afterwards -->
|
|
<PropertyGroup>
|
|
<VcpkgPropsImported>true</VcpkgPropsImported>
|
|
<VcpkgEnabled Condition="'$(VcpkgEnabled)' == ''">true</VcpkgEnabled>
|
|
<VcpkgConfiguration Condition="'$(VcpkgConfiguration)' == ''">$(Configuration)</VcpkgConfiguration>
|
|
<VcpkgUseStatic Condition="'$(VcpkgUseStatic)' == ''">false</VcpkgUseStatic>
|
|
<VcpkgRoot Condition="'$(VcpkgRoot)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..'))</VcpkgRoot>
|
|
|
|
<VcpkgAutoLink Condition="'$(VcpkgAutoLink)' == ''">true</VcpkgAutoLink>
|
|
<!-- Deactivate Autolinking if lld is used as a linker. (Until a better way to solve the problem is found!).
|
|
Tried to add /lib as a parameter to the linker call but was unable to find a way to pass it as the first parameter. -->
|
|
<VcpkgAutoLink Condition="'$(UseLldLink)' == 'true'">false</VcpkgAutoLink>
|
|
<VcpkgApplocalDeps Condition="'$(VcpkgApplocalDeps)' == ''">true</VcpkgApplocalDeps>
|
|
|
|
<!-- Manifest files -->
|
|
<VcpkgEnableManifest Condition="'$(VcpkgEnableManifest)' == ''">false</VcpkgEnableManifest>
|
|
<VcpkgManifestInstall Condition="'$(VcpkgManifestInstall)' == ''">true</VcpkgManifestInstall>
|
|
<VcpkgManifestRoot Condition="'$(VcpkgManifestRoot)' == ''">$([MSbuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), vcpkg.json))</VcpkgManifestRoot>
|
|
</PropertyGroup>
|
|
</Project>
|