Reputation: 165
I was wondering if there is any possibility to override an existing (shipped with CMake) find module with my own? This is so I can supply my slightly updated module with my project without forcing anyone to replace the one that is shipped with CMake.
I tried doing the following:
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "cmake/Modules/FindBullet.cmake")
where "cmake/Modules/FindBullet.cmake" is in my project directory, but it did not seem to work.
Upvotes: 4
Views: 1368
Reputation: 65891
The CMAKE_MODULE_PATH
must be set to the directory containing your version of the find module file:
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
Upvotes: 5