[CMake] Externally hooking a FindXYZ module

Fernando Cacciola fernando.cacciola at gmail.com
Tue Aug 26 08:19:24 EDT 2008


Yuri V. Timenkov wrote:
> [snip]
>> Is there a better way??
> First, you can move linking flags logic outside of FindGL.cmake file, therefore 
> you don't need customization.
> 
Of course... is just that I precisely don't want to do that because this 
affects several unrelated projects and I don't want each and every 
programmer to add the workaround manually after each and every call to 
find_package(OpenGL).
Technically, it is a bug in the find module, and I don't want the rest 
of the team to learn how to workaround it.

> Alternatively you can copy this file to your custom modules directory and do 
> not call original one.
> 
And I also don't want to do that because my system is deployed on 
several users each having its own version of cmake, so I don't want to 
hard code a particular version of FindOpenGL.cmake by distributing it 
unless I really don't have any other choice.

Best

Fernando Cacciola



More information about the CMake mailing list