Skip to content

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

{
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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants