[cmake-developers] FindFoo.cmake and COMPONENTS

Alex Merry alex.merry at kde.org
Wed Mar 26 18:38:51 EDT 2014


On 26/03/14 22:28, Ben Boeckel wrote:
> [ Sorry for stealing the thread, but this might help spawn off a
>   follow-up patch for COMPONENT-handling docs. ]
> 
> On Wed, Mar 26, 2014 at 19:02:40 +0000, Alex Merry wrote:
>> Modules that provide components are glossed over currently, despite
>> being difficult to implement correctly.
> 
> Hmm, I wrote one recently[1] and it didn't seem *too* hard. What sort of
> hidden pitfalls are there? One I can think of (that isn't handled in
> that Find module) is dependencies between components.

*goes to look at the helper module[0] he wrote*

Actually, yeah, it's mainly the dependency handling that's hairy.  There
are couple of other things you have to be aware of; for instance, I've
seen several find modules try to give all the components to
pkg_check_modules() at once, but you can't do that (pkg_check_modules
finds everything or nothing).

Alex



[0]:
https://projects.kde.org/projects/kdesupport/extra-cmake-modules/repository/revisions/master/entry/modules/ECMFindModuleHelpers.cmake



More information about the cmake-developers mailing list