I configure and package my library using CMake and CPack. I have written my own find-module: FindMyLib.cmake
.
How do I tell CMake/CPack to add this file to the CMake module directory, so that future developers can simply specify FIND_PACKAGE(MyLib)
to use my library?
You can set
CMAKE_MODULE_PATH
and distribute your customFindFoo.cmake
with your project. For example: