coding style: components

Alexander Neundorf neundorf at kde.org
Sun Sep 18 11:24:14 UTC 2011


On Sunday, September 18, 2011 09:20:29 AM Yury G. Kudryashov wrote:
> Hi!
> 
> Which libraries should be included in XXX_LIBRARIES if different users need
> different subset of the libraries provided by XXX?
> 
> E.g., gstreamer installs libgstreamer, libgstbase, libgstnet etc.
> 
> I can add COMPONENTS and set XXX_LIBRARIES to the list of requested

My opinion: if COMPONENTS are specified, XXX_LIBRARIES should contain those. 
XXX_FOUND should be set to TRUE if all requrested components have been found.
Some time ago there was a longer discussion about this on the cmake-developers 
list, and I think there was no clear conclusion.
You may want to bring this same issue up there again please.

> libraries but I don't know how to make it work if find_package(GStreamer)
> is called twice in different subdirectories with different COMPONENTS
> arguments.

Why/how does it fail ?
 
> What do you recommend?
> 
> P.S.: Current FindGStreamer hardcodes the following:
> * GSTREAMER_FOUND is TRUE if libgstreamer, libgstbase and libgstinterface
> are found;
> * GSTREAMER_LIBRARIES contains ONLY libgstreamer.

currently it is more a matter of taste, and as long as it is properly 
documented in each module it is ok.

Alex


More information about the Kde-buildsystem mailing list