-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vcpkg] Portfile Settings #7292
Conversation
toolsrc/src/vcpkg/build.cpp
Outdated
{ | ||
args.emplace_back( | ||
"CMAKE_PORT_SETTINGS", | ||
paths.ports / port.value_or_exit(VCPKG_LINE_INFO) / "port-settings.cmake"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work with overlay ports, it will always resolve to <vcpkg_root>/ports/<port>/port-settings.cmake
.
You can get the correct port directory from BuildPackageConfig.config.ports_dir
which seems to be available from all calling sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes. This seems like a trap people can fall into easily
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, probably should rename the variables in VcpkgPaths
ports
->default_ports
triplets
->default_triplets
or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm just going to change the build config to contain a SourceControlFileLocation
.
This PR allows you to add a
port-settings.cmake
file to a port to override settings defined in the triplet globally or to define settings which govern the behavior of the vpckg binary on a per port basis.Written on top of #7290