Skip to content
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

Merged
merged 11 commits into from
Jul 19, 2019
Merged

Conversation

cbezault
Copy link
Contributor

@cbezault cbezault commented Jul 16, 2019

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

@cbezault cbezault added info:internal This PR or Issue was filed by the vcpkg team. wip labels Jul 16, 2019
{
args.emplace_back(
"CMAKE_PORT_SETTINGS",
paths.ports / port.value_or_exit(VCPKG_LINE_INFO) / "port-settings.cmake");
Copy link
Member

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.

Copy link
Contributor

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

Copy link
Member

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.

Copy link
Contributor Author

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.

@cbezault cbezault merged commit 618fa20 into microsoft:master Jul 19, 2019
@cbezault cbezault mentioned this pull request Jul 19, 2019
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants