-
I have a set of convenience CMake functions and variables that I'd like to use across several different projects. Right now I'm forced to manually copy each file or use a git submodule to use them. I could fetch content, but my understanding is that anything like that breaks --only-download and other offline usages of VCPKG, since those cmake commands wouldn't be run until package build time (which is too late to fetch things from the internet). I would like to instead see if I could use VCPKG to do this, I see
Is there a method to accomplish this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Provide your functions as a CMake config package.
And this basically works even without vcpkg - just offer the config file in a location searched by |
Beta Was this translation helpful? Give feedback.
Provide your functions as a CMake config package.
my-scripts
.share/my-scripts/my-scripts-config.cmake
.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
.