pkg_config quick non intrusive solution

Alexander Neundorf neundorf at kde.org
Thu Nov 13 22:47:30 CET 2008


Hi,

On Thursday 13 November 2008, Helio Chissini de Castro wrote:
> On Quarta 12 Novembro 2008, Alexander Neundorf wrote:
...
> > I guess the FIND_LIBRARY() should have the NO_DEFAULT_PATH argument, so
> > it only looks in the given directories. Or, probably better, use HINTS
> > instead of PATHS, then the given dirs will be checked before the default
> > dirs. You can also do
> > list(APPEND QCA2_TMP_LIB ${TMP_LIB})
> > then you don't have to check whether QCA2_TMP_LIB is empty or not.
> >
> > Alex
>
> Since this will be not the only one package affected, can we create sort of
> a macro to do this ?
> Will become a generic solution.

Yes. It should go into FindPkgConfig.cmake. I.e. we take the one from cmake 
2.6.2, modify it, and add it to kdelibs/cmake/modules/, so it will be 
preferred over the one coming with cmake.

But (a big but), I had a look at the modules you modified, the diff compared 
to the versions before is attached.

There are _major_ problems:

FindExiv2.cmake: completely broken on Windows
FindKexiv2, FindKipi: broken if pkgconfig was found but failed (the same 
problem with find_path() as in FindStrigi yesterday), source- and 
styleguide-incompatible renaming of the include dir variable
FindXine: completely broken, relies on pkgconfig under !Windows, under Windows 
does nothing, documentation removed, source- and styleguide incompatible 
renames
FindStrigi: seems to work (but nevertheless has more modifications than I feel 
comfortable with)

1) So, the changes break the modules, see above
2) Even if they wouldn't obviously break things, they are too big and too many 
changes at once. I don't feel I can even kind-of guarantee that they still 
work as good as before.
3) what is actually the motivation for these changes ?

I (strongly) suggest (in this order):
1.) ASAP revert the files completely back to the state they were before your 
changes
2.) then enhance FindPkgConfig.cmake module as you suggested
3.) then improve the modules you are interested by sending the patch first to 
kde-buildsystem

Thanks
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modules.diff
Type: text/x-diff
Size: 29972 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20081113/75dd15cf/attachment-0001.bin 


More information about the Kde-buildsystem mailing list