[CMake] Call for Module maintainer volunteers

Hendrik Sattler post at hendrik-sattler.de
Thu Jul 26 04:19:24 EDT 2007


Zitat von Andreas Schneider <mail at cynapses.org>:

> Mathieu Malaterre wrote:
>> On 7/25/07, Hendrik Sattler <post at hendrik-sattler.de> wrote:
>>> Am Mittwoch 25 Juli 2007 17:40 schrieb Andreas Schneider:
>>> > If someone is using GTK2 I've created a nice Module too. But it isn't
>>> > used at WengoPhone at the moment and I'm not a Gnome guy. Maybe someone
>>> > else wants to take and maintain it.
>>> >
>>> >
>>> http://cmake-modules.googlecode.com/svn/trunk/Modules/GTK2/FindGTK2.cmake
>>>
>>> Looks a bit oversized, especially since pkgconfig is not limited to unix
>>> platform. On Windows, you just have to setup PKG_CONFIG_PATH environment
>>> variable correctly to find the stuff. Thus the modules would be
>>> useless and
>>> the FindPkgConfig.cmake is sufficient.
>>
>> I have to second that. Those FindPackage module are difficult to
>> maintain because they contain such hard coded path instead of using
>> more elaborate solution. For instance which would use pkg-config to
>> search for gtk2. Same comment for python, one should only need to
>> specify which python executable so that cmake deduce correct path see
>> #2257
>
> sorry, but have you really looked at the code of the Module? I see a
> pkgconfig line for every GTK Module in the FindPackage Module.

Yes I did, that's why I said that pkgconfig is sufficient.

> pkgconfig(glib-2.0 _GLIB2IncDir _GLIB2LinkDir _GLIB2LinkFlags _GLIB2Cflags)
>
> If for whatever reason pkgconfig isn't install you can still find the
> libraries and the headers.

Or simply require pkgconfig. You require cmake for building, too.  
Another piece isn't that hard, then, especially because the  
precompiled gtk for win32[1] has a pkgconfig at its side and on the  
other systems its easy to install (if not already).

> pkg-config is fine to find the path for the libraries and the headers,
> but it doesn't check if they really exists.

Please do not go the way that the autotools went: make _absolutely_  
sure by double-checking. No. If you give the user a gun he has the  
perfect right to shoot himself in the foot. Only installing the  
pkgconfig file without the rest or moving things around without  
knowledge is just that.
The following compilation will tell the user as well that he messed up.

I wouldn't mind such a module (although I really believe that it's not  
necessary) but please take a look at FindQt4.cmake about using use  
flag variables to NOT look for every gtk-related libs by default. If  
every module would do that, we will soon have the same coffee pause as  
for autotools configure scripts. I really object to that.

HS

[1]: http://www.gimp.org/win32/




More information about the CMake mailing list