[CMake] Unable to find GTK with cmake on Ubuntu

Philip Lowman philip at yhbt.com
Fri Dec 19 07:39:35 EST 2008


On Thu, Dec 18, 2008 at 2:37 PM, Hendrik Sattler <post at hendrik-sattler.de>wrote:

> Am Thursday 18 December 2008 20:03:25 schrieb Philip Lowman:
> > Could you try the following beta FindGTK2 module?
> >
> > Set CMAKE_MODULE_PATH prior to calling FIND_PACKAGE(GTK2 COMPONENTS gtk)
> > See the module for details
>
> Some notes: you should make better use of path suffixes in find_file
> instead
> of repeating standard paths. Additionally, you should prefer the directory
> of
> the glib library + include/ for finding glibconfig.h.


Thanks for the pointers.  I've switched to path suffixes for the include
paths (it's not any more readable but it cuts down on the number of lines in
the file). I also fixed a lot of other stuff.

One question for you, however.  Is the module picking up glibconfig.h in the
wrong directory?  If so, what directory, what version of GTK, etc.?  In
other words, is the current hack I have in there about searching all of the
relative directories causing problems for you?  I've been meaning to modify
my header file searching macro to limit the find_path() search to just the
proper relative include directory.  I will probably fix this at some point
in the near future.

Also, this module eagerly awaits wildcard support for find_library().  GTK
also uses blasted version numbers encoded in the filename (like FindBoost).

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081219/101058d0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindGTK2.cmake
Type: application/octet-stream
Size: 12075 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081219/101058d0/attachment-0001.obj>


More information about the CMake mailing list