Skip to content

How do I package up a set of CMake functions to be distributed via VCPKG? #35899

Answered by dg0yt
Cazadorro asked this question in Q&A
Discussion options

You must be logged in to vote

Provide your functions as a CMake config package.

  • Let's assume your port is called my-scripts.
  • Let the port install your script functions as share/my-scripts/my-scripts-config.cmake.
  • In your CMake projects, simply do find_package(my-scripts CONFIG REQUIRED)

And this basically works even without vcpkg - just offer the config file in a location searched by find_package.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Cazadorro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants