Adds vcpkg item to project settings in Visual Studio#4361
Adds vcpkg item to project settings in Visual Studio#4361BillyONeal merged 23 commits intomicrosoft:masterfrom
Conversation
|
Another nice feature would be to scan the triplet folder on integration and make the VcpkgTriplet selection an enum based on that. Example how to do enums in the xml are given in |
yuehuang010
left a comment
There was a problem hiding this comment.
Overall, looks good. Please address the space/tabs to be consistant with the rest of the documents.
The $(Platform) is almost always defined and is (almost) never empty.
I only review the goal and changes to achieve the goal. I don't validate correctness and testing. Please make sure that each field in the property page works as indented.
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <VcpkgTripletPrefix Condition="'$(VcpkgTripletPrefix)' == ''">$(PlatformTarget)</VcpkgTripletPrefix> |
There was a problem hiding this comment.
Does this work with older Visual Studio versions? Only checked for latest version of Visual Studio 2017. If it does not generally work I can change it back to the old conditional.
|
Thanks for the PR! This is really cool! Testing to be done before this can be merged:
Additionally, this will break all current users who have run |
Tried that first. The fields in the property page are empty then. The defaults can only be set in a *.props file. I also tried to import a *.props file in the available applocal *.target file but this also does not work. Since bootstrap must be run anyway to recompile vcpkg you could make a call to vcpkg integrate install mandatory if system wide user integration is detected after recompiling. |
|
Note for people who want to play with this and change settings/properties/layout: |
|
Yes, VS caches all .targets, .props, and property page xml. This is huge perf gain when loading multiple projects. |
|
@Neumann-A, thanks for contributing to vcpkg! All triplets build successfully. |
|
@BillyONeal: looks ok. I hope you tested it? |
I tested that vcpkg itself works and that our ports that rely on the msbuild integration to find dependencies work. I did not test the VS interaction here because I don't really understand that. (I just didn't want you to have to do work to merge this since it's been here a long time :) ) |
|
Remaining todos:
|
|
@Neumann-A Thanks very much for your contribution! |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…t#4361) Co-authored-by: Curtis J Bezault <curtbezault@gmail.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
|
This PR ends up breaking vcpkg clients who used VcpkgTriplet in .vcxproj files to specify the desired triplet. See #12062 |
|
@strega-nil How close is your manifests PR to merging? I didn't want to address @aggieNick02 's point above yet because a fix here is going to cause another merge mess for you but if you expect that needs more than ~a day further I need to do that.... |
|
It's this friday close. Fix it and I'll merge mine back in. |
…t#4361) Co-authored-by: Curtis J Bezault <curtbezault@gmail.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
…t#4361) Co-authored-by: Curtis J Bezault <curtbezault@gmail.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

To solve #4359
Problem currently:
<PropertyPageSchemaInclude="C:\Sources\Extern\vcpkg\scripts\buildsystems\msbuild\vcpkg-general.xml">is an absolute path (replacing with
([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\scripts\buildsystems\msbuild\vcpkg-general.xmldid not work)and
Property
$(VcpkgRoot)is currently blankedit: All fields are blank; I just had a *.props file added to my project to define some of the values. So we need to included those into vcpkg.system.props to define defaults.
To solve this: Changes in commands.integrate.cpp may be necessary?