[vcpkg] Provide $(VcpkgRoot) and $(VcpkgCurrentInstalledDir) for customers. #11779
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a competing resolution with #11772
In 4fb2256#diff-f7a49059a86ff0bb925110f33551a677R57 I removed all uses of$(VcpkgRoot) and $ (VcpkgCurrentInstalledDir) because sometimes those properties were passed on the command line or from a user project where they are likely to not have a trailing slash. The intent was to always use VcpkgRootSanitized or similar, which was the same as VcpkgRoot but with a trailing slash added if one was missing from the input. (We could not use the same name because msbuild ignores any modifications of properties set on the command line when msbuild is invoked by default)
This change uses TreatAsLocalProperty to do the add-trailing-slash sanitization, without changing the property name, because it turned out folks were using that property in their own build scripts.