Standard for placing any template Find-modules with the original lib? (was: Re: Strange commit to FindKDE4Internal.cmake)

Friedrich W. H. Kossebau kossebau at
Fri Feb 17 18:22:53 UTC 2012

Am Freitag, 17. Februar 2012, 17:33:34 schrieb Alexander Neundorf:
> A library must never install the Find-module for itself.
> This defeats the purpose. This is like putting the remote control right next
> to the TV, or the treasure map right into the treasure chest. You don't
> know where the plan is, but once you found the plan, you already found what
> you are interested in and don't need the plan anymore.

That reminds me of something I wanted to ask for a while:

A few libraries provide in their sources a template for the Find-module for 
itselves, as a nice starting point for devs using the lib and needing that 

But IIRC those libs had the template file in the same "cmake/modules" subdir 
where also the normal Find-modules which are actually used by the lib's 
buildsystem are located. A little bit confusing, at least for me the template 
file would be ideally in a separate file and even have a special name, like 
"Find*.cmake.template" or similar, to help discoverability.

Do you have a proposal or know a pattern-to-follow how to name and where to 
place such Find-module templates? Would be nice if there could be some 

E.g. for my RIFF-parser lib libkoralle I would like to ship a template Find-
module, but also want any user of the lib discover what I provided for them, 
so my work is not uselessly duplicated. Placing that in extra-cmake-modules 
would help only KDE-centric devs, no?


More information about the Kde-buildsystem mailing list