Question

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.

Was it helpful?

Solution

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")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top