vcpkg/scripts/buildsystems/msbuild/vcpkg.targets

260 lines
16 KiB
Plaintext
Raw Normal View History

[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Import default properties if not done yet. This does not overwrite any previously defined properties. -->
<Import Condition="'$(VcpkgPropsImported)' != 'true'" Project="vcpkg.props" />
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<!-- VS2015's version of "vcpkg integrate install" imports both the props and targets together in the "props" area,
meaning we have no opportunity to respond to user customizations in their project files. It also means that this
.targets must defend against normal properties being unset. (For example, VcpkgPlatformTarget below.)
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Also, we copy all initial values to internal values to avoid properties being inconsistently evaluated in targets
and dependent properties.
-->
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<PropertyGroup>
<_ZVcpkgRoot>$(VcpkgRoot)</_ZVcpkgRoot>
<_ZVcpkgManifestRoot>$(VcpkgManifestRoot)</_ZVcpkgManifestRoot>
<_ZVcpkgInstalledDir>$(VcpkgInstalledDir)</_ZVcpkgInstalledDir>
</PropertyGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<!-- Add trailing slashes to inputs that must have them to conform with msbuild conventions. -->
<PropertyGroup>
<_ZVcpkgRoot Condition="!$(_ZVcpkgRoot.EndsWith('\'))">$(_ZVcpkgRoot)\</_ZVcpkgRoot>
<_ZVcpkgManifestRoot Condition="'$(_ZVcpkgManifestRoot)' != '' and !$(_ZVcpkgManifestRoot.EndsWith('\'))">$(_ZVcpkgManifestRoot)\</_ZVcpkgManifestRoot>
<_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' != '' and !$(_ZVcpkgInstalledDir.EndsWith('\'))">$(_ZVcpkgInstalledDir)\</_ZVcpkgInstalledDir>
</PropertyGroup>
<PropertyGroup>
<_ZVcpkgClassicOrManifest Condition="'$(VcpkgEnabled)' == 'true' And ('$(VcpkgEnableClassic)' == 'true' Or '$(VcpkgEnableManifest)' == 'true')">true</_ZVcpkgClassicOrManifest>
<_ZVcpkgClassicOrManifest Condition="'$(_ZVcpkgClassicOrManifest)' == ''">false</_ZVcpkgClassicOrManifest>
</PropertyGroup>
[community triplet] adds triplets for building for the Xbox platform (#29210) * Try adding xbox triplets * Update for Gaming Command Prompt usage * Fix directxtk12 shaders for xbox * Add toolchain for xbox * Fix ports for feature builds * Code review feedback * More code review * Code review * WIN32_LEAN_AND_MEAN is too aggressive for many libs * Normalize GDK variable paths * Need to leave oldnames.lib as many libs use POSIX names * More code review feedback * Remove extra file * Use of /DEFAULTLIB fixed 41 ports * Code review feedback * Added basic xbox supports expression * Updates for xbox-aware ports * Update for CMake fixes upstream * Minor synatx fix * Fix up merge issues * Need directx-headers for linux * Missed one port revision * Removed VCPKG_TARGET_IS_XBOX from project scope after upstream fixes * Update baseline * License updates per github-actions bot * Update baseline * Update toolchain to support try_compile for GDK headers * Update port numbers * Update baseline * Don't need directx-dxc for Xbox builds * Update baseline * Update hashes * Code review * Update baseline * Refresh hashes for upstream fixes * Update baseline * Add ms-gdkx stub port * Update baseline * updated ms-gdkx with user-friendly output * Update baseline * Code review for the toolchain file * Update directxkt12 hash * Refresh baseline * Update MSBuild integration to select proper triplet for GDK custom platforms * Update CMake integration to select proper xbox triplet from XBOX_CONSOLE_TARGET * vcpkg.targets update * Code review feedback * Update baseline * Refresh baseline * Code review for MSBuild * Code review for xbox toolchain * vcpkg.cmake codereview --------- Co-authored-by: walbourn <chuckw_walbourn@yahoo.com>
2023-03-09 06:06:20 +08:00
<!-- Special-case custom MSBuild platforms defined in the Microsoft GDK. See https://aka.ms/gdk and https://aka.ms/gdkx -->
<PropertyGroup Condition="'$(VcpkgOSTarget)' == '' AND '$(VcpkgPlatformTarget)' == '' AND '$(Platform)'=='Gaming.Desktop.x64'">
<VcpkgOSTarget>windows</VcpkgOSTarget>
<VcpkgPlatformTarget>x64</VcpkgPlatformTarget>
<VcpkgUseMD>true</VcpkgUseMD>
</PropertyGroup>
<PropertyGroup Condition="'$(VcpkgOSTarget)' == '' AND '$(VcpkgPlatformTarget)' == '' AND '$(Platform)'=='Gaming.Xbox.Scarlett.x64'">
<VcpkgOSTarget>xbox-scarlett</VcpkgOSTarget>
<VcpkgPlatformTarget>x64</VcpkgPlatformTarget>
<VcpkgUseMD>false</VcpkgUseMD>
</PropertyGroup>
<PropertyGroup Condition="'$(VcpkgOSTarget)' == '' AND '$(VcpkgPlatformTarget)' == '' AND '$(Platform)'=='Gaming.Xbox.XboxOne.x64'">
<VcpkgOSTarget>xbox-xboxone</VcpkgOSTarget>
<VcpkgPlatformTarget>x64</VcpkgPlatformTarget>
<VcpkgUseMD>false</VcpkgUseMD>
</PropertyGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<!-- Determine the triplet to use. Note that $(PlatformTarget) is not available at the top of the .vcxproj file. -->
<PropertyGroup Condition="'$(VcpkgOSTarget)' == ''">
<VcpkgOSTarget>windows</VcpkgOSTarget>
<VcpkgOSTarget Condition="'$(AppContainerApplication)' == 'true'">uwp</VcpkgOSTarget>
</PropertyGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<PropertyGroup Condition="'$(VcpkgPlatformTarget)' == ''">
<VcpkgPlatformTarget>$(Platform)</VcpkgPlatformTarget>
<VcpkgPlatformTarget Condition="'$(Platform)' == 'Win32'">x86</VcpkgPlatformTarget>
</PropertyGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<PropertyGroup>
<_ZVcpkgLinkage />
<_ZVcpkgLinkage Condition="'$(VcpkgUseStatic)' == 'true'">-static</_ZVcpkgLinkage>
<_ZVcpkgLinkageMD />
<_ZVcpkgLinkageMD Condition="'$(VcpkgUseStatic)' == 'true' and '$(VcpkgUseMD)' == 'true'">-md</_ZVcpkgLinkageMD>
<VcpkgTriplet Condition="'$(VcpkgTriplet)' == ''">$(VcpkgPlatformTarget)-$(VcpkgOSTarget)$(_ZVcpkgLinkage)$(_ZVcpkgLinkageMD)</VcpkgTriplet>
<VcpkgTriplet Condition="!$(VcpkgTriplet.EndsWith($(_ZVcpkgLinkage)$(_ZVcpkgLinkageMD)))">$(VcpkgTriplet)$(_ZVcpkgLinkage)$(_ZVcpkgLinkageMD)</VcpkgTriplet>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
</PropertyGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<!-- Include the triplet in ProjectStateLine to force VS2017 and later to fully rebuild if the user changes it. -->
<PropertyGroup>
<ProjectStateLine>VcpkgTriplet=$(VcpkgTriplet):$(ProjectStateLine)</ProjectStateLine>
2016-11-01 08:02:39 +08:00
</PropertyGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<!-- Determine the locations trees we want to consume. _ZVcpkgInstalledDir is special in that it doesn't have a default
value in the .props because we normally derive it, but users may override the value. -->
<Choose>
<When Condition="'$(VcpkgEnableManifest)' == 'true'">
<PropertyGroup>
<_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' == ''">$(_ZVcpkgManifestRoot)vcpkg_installed\$(VcpkgTriplet)\</_ZVcpkgInstalledDir>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<_ZVcpkgInstalledDir Condition="'$(_ZVcpkgInstalledDir)' == ''">$(_ZVcpkgRoot)installed\</_ZVcpkgInstalledDir>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<_ZVcpkgCurrentInstalledDir>$(_ZVcpkgInstalledDir)$(VcpkgTriplet)\</_ZVcpkgCurrentInstalledDir>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<_ZVcpkgNormalizedConfiguration Condition="$(VcpkgConfiguration.StartsWith('Debug'))">Debug</_ZVcpkgNormalizedConfiguration>
<_ZVcpkgNormalizedConfiguration Condition="$(VcpkgConfiguration.StartsWith('Release')) or '$(VcpkgConfiguration)' == 'RelWithDebInfo' or '$(VcpkgConfiguration)' == 'MinSizeRel'">Release</_ZVcpkgNormalizedConfiguration>
<_ZVcpkgConfigSubdir Condition="'$(_ZVcpkgNormalizedConfiguration)' == 'Debug'">debug\</_ZVcpkgConfigSubdir>
<_ZVcpkgExecutable>$(_ZVcpkgRoot)vcpkg.exe</_ZVcpkgExecutable>
<ExternalIncludePath Condition="'$(_ZVcpkgClassicOrManifest)' == 'true'">$(ExternalIncludePath);$(_ZVcpkgCurrentInstalledDir)include</ExternalIncludePath>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
</PropertyGroup>
<PropertyGroup>
<!-- Note: Overwrite VcpkgPageSchema with a non-existing path to disable the VcPkg property sheet in your projects -->
<VcpkgPageSchema Condition="'$(VcpkgPageSchema)' == ''">$(_ZVcpkgRoot)scripts\buildsystems\msbuild\vcpkg-general.xml</VcpkgPageSchema>
</PropertyGroup>
<ItemGroup Condition="'$(VcpkgPageSchema)' != '' and exists('$(VcpkgPageSchema)') and '$(MSBuildToolsVersion)' != '14.0'">
<PropertyPageSchema Include="$(VcpkgPageSchema)">
<Context>Project</Context>
</PropertyPageSchema>
</ItemGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<!-- Install settings to get headers and import libs for the currently selected _ZVcpkgCurrentInstalledDir -->
<ItemDefinitionGroup Condition="'$(_ZVcpkgClassicOrManifest)' == 'true'">
<Lib>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib;$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\manual-link</AdditionalLibraryDirectories>
</Lib>
<Link>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<AdditionalDependencies Condition="'$(VcpkgAutoLink)' != 'false'">%(AdditionalDependencies);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\*.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib;$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)lib\manual-link</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(_ZVcpkgCurrentInstalledDir)include</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(_ZVcpkgCurrentInstalledDir)include</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<Target Name="VcpkgCheckManifestRoot" BeforeTargets="VcpkgInstallManifestDependencies" Condition="'$(VcpkgEnabled)' == 'true'">
<Error Text="The vcpkg manifest was enabled, but we couldn't find a manifest file (vcpkg.json) in any directories above $(MSBuildProjectDirectory). Please add a manifest, disable manifests in your properties page, or pass /p:VcpkgEnableManifest=false."
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Condition="'$(VcpkgEnableManifest)' == 'true' and '$(_ZVcpkgManifestRoot)' == ''" />
<Message Text="The vcpkg manifest was disabled, but we found a manifest file in $(_ZVcpkgManifestRoot). You may want to enable vcpkg manifests in your properties page or pass /p:VcpkgEnableManifest=true to the msbuild invocation."
Importance="High" Condition="'$(VcpkgEnableManifest)' != 'true' and '$(_ZVcpkgManifestRoot)' != ''" />
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
</Target>
<Target Name="VcpkgTripletSelection" BeforeTargets="ClCompile" Condition="'$(_ZVcpkgClassicOrManifest)' == 'true'">
<Message Text="Using triplet &quot;$(VcpkgTriplet)&quot; from &quot;$(_ZVcpkgCurrentInstalledDir)&quot;"
Importance="Normal" Condition="'$(VcpkgEnabled)' == 'true'"/>
<Message Text="Using normalized configuration &quot;$(_ZVcpkgNormalizedConfiguration)&quot;"
Importance="Normal" Condition="'$(VcpkgEnabled)' == 'true'"/>
<Message Text="Not using Vcpkg because VcpkgEnabled is &quot;$(VcpkgEnabled)&quot;"
Importance="Normal" Condition="'$(VcpkgEnabled)' != 'true'"/>
<Message Text="Vcpkg is unable to link because we cannot decide between Release and Debug libraries. Please define the property VcpkgConfiguration to be 'Release' or 'Debug' (currently '$(VcpkgConfiguration)')."
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Importance="High" Condition="'$(VcpkgEnabled)' == 'true' and '$(_ZVcpkgNormalizedConfiguration)' == ''"/>
</Target>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<Choose>
<When Condition="'$(VcpkgHostTriplet)' != ''">
<PropertyGroup>
<_ZVcpkgHostTripletParameter>"--host-triplet=$(VcpkgHostTriplet)"</_ZVcpkgHostTripletParameter>
<_ZVcpkgHostTripletSuffix>$(VcpkgHostTriplet).</_ZVcpkgHostTripletSuffix>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<_ZVcpkgHostTripletParameter />
<_ZVcpkgHostTripletSuffix />
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<_ZVcpkgManifestFileLocation>$(_ZVcpkgManifestRoot)vcpkg.json</_ZVcpkgManifestFileLocation>
<_ZVcpkgConfigurationFileLocation>$(_ZVcpkgManifestRoot)vcpkg-configuration.json</_ZVcpkgConfigurationFileLocation>
<_ZVcpkgMSBuildStampFile>$(_ZVcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(_ZVcpkgHostTripletSuffix)stamp</_ZVcpkgMSBuildStampFile>
</PropertyGroup>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<ItemGroup Condition="'$(VcpkgEnabled)' == 'true' and '$(VcpkgEnableManifest)' == 'true' and '$(VcpkgManifestInstall)' == 'true'">
<_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgManifestFileLocation)"/>
<_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgConfigurationFileLocation)" Condition="Exists('$(_ZVcpkgConfigurationFileLocation)')"/>
</ItemGroup>
<Target Name="VcpkgInstallManifestDependencies" BeforeTargets="ClCompile"
Condition="'$(VcpkgEnabled)' == 'true' and '$(VcpkgEnableManifest)' == 'true' and '$(VcpkgManifestInstall)' == 'true'"
Inputs="@(_ZVcpkgInstallManifestDependenciesInputs)"
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Outputs="$(_ZVcpkgMSBuildStampFile)">
<!-- This is set inside the target because $(TLogLocation) may not be set yet when parsing the .targets on VS2015 -->
<PropertyGroup>
<_ZVcpkgTLogFileLocation>$(TLogLocation)VcpkgInstallManifest$(VcpkgTriplet).$(_ZVcpkgHostTripletSuffix)read.1u.tlog</_ZVcpkgTLogFileLocation>
</PropertyGroup>
<Message Text="Installing vcpkg dependencies to $(_ZVcpkgInstalledDir)" Importance="High" />
<MakeDir Directories="$(_ZVcpkgInstalledDir)" />
<Message Text="%22$(_ZVcpkgExecutable)%22 install $(_ZVcpkgHostTripletParameter) --x-wait-for-lock --triplet %22$(VcpkgTriplet)%22 --vcpkg-root %22$(_ZVcpkgRoot)\%22 %22--x-manifest-root=$(_ZVcpkgManifestRoot)\%22 %22--x-install-root=$(_ZVcpkgInstalledDir)\%22 $(VcpkgAdditionalInstallOptions)"
Importance="High" />
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<Exec Command="%22$(_ZVcpkgExecutable)%22 install $(_ZVcpkgHostTripletParameter) --x-wait-for-lock --triplet %22$(VcpkgTriplet)%22 --vcpkg-root %22$(_ZVcpkgRoot)\%22 %22--x-manifest-root=$(_ZVcpkgManifestRoot)\%22 %22--x-install-root=$(_ZVcpkgInstalledDir)\%22 $(VcpkgAdditionalInstallOptions)"
StandardOutputImportance="High"
StandardErrorImportance="High"
UseUtf8Encoding="Always"
StdOutEncoding="utf-8"
StdErrEncoding="utf-8"
UseCommandProcessor="false"
/>
<WriteLinesToFile File="$(_ZVcpkgTLogFileLocation)"
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Lines="@(_ZVcpkgInstallManifestDependenciesInputs -> '^%(Identity)')"
Encoding="Unicode"
Overwrite="true"/>
<Touch Files="$(_ZVcpkgMSBuildStampFile)" AlwaysCreate="true" />
<CreateProperty Value="false">
<Output TaskParameter="ValueSetByTask" PropertyName="Link_MinimalRebuildFromTracking" />
</CreateProperty>
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
</Target>
<Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup;RegisterOutput"
Condition="'$(_ZVcpkgClassicOrManifest)' == 'true' and '$(VcpkgApplocalDeps)' == 'true' and '$(LinkSkippedExecution)' != 'true' and '@(Link)' != ''">
<Message Text="[vcpkg] Starting VcpkgApplocalDeps" Importance="low" />
<PropertyGroup>
<_ZVcpkgApplocalInstalledBinDir>$(_ZVcpkgCurrentInstalledDir)$(_ZVcpkgConfigSubdir)bin</_ZVcpkgApplocalInstalledBinDir>
<_ZVcpkgApplocalTLogPath>$(TLogLocation)$(ProjectName).write.1u.tlog</_ZVcpkgApplocalTLogPath>
<_ZVcpkgApplocalCopiedFilesLogPath>$(IntDir)vcpkg.applocal.log</_ZVcpkgApplocalCopiedFilesLogPath>
<_ZVcpkgApplocalBuiltinArguments>--target-binary="$(TargetPath)" --installed-bin-dir="$(_ZVcpkgApplocalInstalledBinDir)" --tlog-file="$(_ZVcpkgApplocalTLogPath)" --copied-files-log="$(_ZVcpkgApplocalCopiedFilesLogPath)"</_ZVcpkgApplocalBuiltinArguments>
<_ZVcpkgAppLocalPowerShellCommonArguments>-ExecutionPolicy Bypass -noprofile -File "$(MSBuildThisFileDirectory)applocal.ps1" "$(TargetPath)" "$(_ZVcpkgApplocalInstalledBinDir)" "$(_ZVcpkgApplocalTLogPath)" "$(_ZVcpkgApplocalCopiedFilesLogPath)"</_ZVcpkgAppLocalPowerShellCommonArguments>
</PropertyGroup>
<Exec
Condition="'$(VcpkgXUseBuiltInApplocalDeps)' == 'true'"
Command="%22$(_ZVcpkgExecutable)%22 z-applocal $(_ZVcpkgApplocalBuiltinArguments)"
UseUtf8Encoding="Always"
StdOutEncoding="utf-8"
StdErrEncoding="utf-8"
UseCommandProcessor="false"
IgnoreExitCode="true">
<Output TaskParameter="ExitCode"
PropertyName="_ZVcpkgAppLocalExitCode" />
</Exec>
<Warning Text="[vcpkg] Failed to gather app local DLL dependencies, program may not run. Set VcpkgApplocalDeps to false in your project file to suppress this warning. Builtin arguments: $(_ZVcpkgApplocalBuiltinArguments)"
Condition="$(_ZVcpkgAppLocalExitCode) != 0 and '$(VcpkgXUseBuiltInApplocalDeps)' == 'true'"/>
<!-- Search %PATH% for pwsh.exe if it is available. -->
<Exec
Condition="'$(VcpkgXUseBuiltInApplocalDeps)' != 'true'"
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Command="pwsh.exe $(_ZVcpkgAppLocalPowerShellCommonArguments)"
IgnoreExitCode="true"
UseCommandProcessor="false">
<Output TaskParameter="ExitCode"
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
PropertyName="_ZVcpkgAppLocalExitCode" />
2016-09-19 11:50:08 +08:00
</Exec>
<!-- Fall back to well known system PowerShell location otherwise. -->
<Message Text="[vcpkg] Failed to run applocal.ps1 using pwsh, falling back to system PowerShell." Importance="low"
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Condition="$(_ZVcpkgAppLocalExitCode) == 9009" />
<Exec
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Command="%22$(SystemRoot)\System32\WindowsPowerShell\v1.0\powershell.exe%22 $(_ZVcpkgAppLocalPowerShellCommonArguments)"
IgnoreExitCode="true"
UseCommandProcessor="false"
Condition="$(_ZVcpkgAppLocalExitCode) == 9009 and '$(VcpkgXUseBuiltInApplocalDeps)' != 'true'">
<Output TaskParameter="ExitCode"
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
PropertyName="_ZVcpkgAppLocalExitCode" />
</Exec>
<!-- We're ignoring the above exit codes, so translate into a warning if both failed. -->
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<Warning Text="[vcpkg] Failed to gather app local DLL dependencies, program may not run. Set VcpkgApplocalDeps to false in your project file to suppress this warning. PowerShell arguments: $(_ZVcpkgAppLocalPowerShellCommonArguments)"
Condition="$(_ZVcpkgAppLocalExitCode) != 0 and '$(VcpkgXUseBuiltInApplocalDeps)' != 'true'"/>
<ReadLinesFromFile File="$(IntDir)vcpkg.applocal.log"
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
Condition="$(_ZVcpkgAppLocalExitCode) == 0">
<Output TaskParameter="Lines" ItemName="VcpkgAppLocalDLLs" />
</ReadLinesFromFile>
[vcpkg] Repair msbuild damage and workaround the way we integrate on VS2015. (#19767) * 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.
2021-09-03 03:33:21 +08:00
<Message Text="@(VcpkgAppLocalDLLs,'%0A')" Importance="Normal" Condition="$(_ZVcpkgAppLocalExitCode) == 0" />
<ItemGroup Condition="$(_ZVcpkgAppLocalExitCode) == 0">
<ReferenceCopyLocalPaths Include="@(VcpkgAppLocalDLLs)" />
</ItemGroup>
2016-09-19 11:50:08 +08:00
</Target>
[vcpkg manifest] Manifest Implementation (#11757) ==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-07-01 01:40:18 +08:00
</Project>