Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake: Overriding a find module

Tags:

cmake

bullet

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.

like image 944
prayforbacon Avatar asked Oct 24 '25 18:10

prayforbacon


1 Answers

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")
like image 167
sakra Avatar answered Oct 26 '25 16:10

sakra