Reputation: 5180
I have a custom (complex) Find-cmake module. Everything works just fine.
My problem is that i need this find-module in many projects to detect my libraray (like the QT cmake stuff).
Is it possible to install my module in a central directory where i can "find" it?
I know that i have to set the CMAKE_MODULE_PATH to the directory, but for a central install location this approach seems to be strange.
So what is the preferred way to use a find module in multiple projects?
Upvotes: 2
Views: 144
Reputation: 1060
Actually there is a registry for CMake packages:
https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#user-package-registry
Note that I never used it, because where I work we do both compilation and cross-compilation on the same box, thus we have to have different cmake files
Upvotes: 2