Review Request: Attica will not be found if installed under /usr/local/

Alexander Neundorf neundorf at kde.org
Thu Sep 23 18:54:23 BST 2010


On Thursday 23 September 2010, Guy Maurel wrote:
> On Wednesday 22 September 2010 21:28:35 you wrote:
> > On Wednesday 22 September 2010, Guy Maurel wrote:
> > ...
> >
> > > > Many people prefer the results of pkg-config over what cmake finds by
> > > > itself. That's why this is the order we have in many find-modules.
> > >
> > > what about I am wondering. At the kdelibs/cmake/modules, there are many
> > > variants of the use of FIND_PATH
> > > Is it not to find "the best strategy" and use it for *all* the
> > > cmake-files? You write "many people prefer..." A. It seems to be "many
> > > people prefer..." B And I like the next one!
> >
> > Sorry, I don't understand what you mean.
> > Can you please explain ?
> >
> > Alex
>
> Yes.
> Some, such as FindAGG,
> use the option PATH
>
> Some, such as FindAlsa, FindAvahi, FindBerkeleyDB,
> dont use any option.

If paths are listed but neither PATHS nor HINTS are used, this is the same as 
listing the paths after the PATHS keyword.

> Some, such as FindBlitz,
> use the options  NAMES, PATH_SUFFIXES, PATHS
>
> Some, such as FindBlueZ,
> use the options  NAMES, PATHS
>
> Some, such as FindDBusMenuQt,
> use the options  HINTS, PATH_SUFFIXES
>
> Some, such as FindDocBookXML
> use the options PATH, PATH_SUFFIXES
>
> and so on...
>
> Is such a variety of uses the rigth way? Is it really necessary?

PATH_SUFFIXES has a different purpose, so this one doesn't count here.
It adds suffixes after the base search directories, e.g. if a lib "foo" 
installs headers into PREFIX/include/foo/include, PATH_SUFFIXES should be set 
to "foo/include/".

The HINTS keyword is relatively new, it was introduced in cmake 2.6.1, which 
is required in KDE since 4.2. In KDE 4.0 and 4.1 we required cmake 2.4.5, 
which didn't have the HINTS keyword.

In general I would recommend using HINTS over PATHS.

> > We have FindPackageHandleStandardArgs.cmake in kdelibs from current
> > cmake, please have a look at its documentation.
> > It should be possible to remove the whole version checking chunk and just
> > do
>
> This really the *better* way.
> Could it be possible to move (all) the cmake files to this method?
> It will be an improvment for all of us!

Of course, it just needs somebody to do it :-)

I'd be very happy if you help with this and start posting patches for review 
to kde-buildsystem (it is important not to break source compatiblity).

Alex




More information about the kde-core-devel mailing list