[CMake] FindGTK2.cmake

Brad King brad.king at kitware.com
Tue May 3 09:06:37 EDT 2005


Juan José Aja Fernández wrote:
> I'm developing an application in VTK using glade to build the GUI.
> I would like to build my app using cmake (is it posible any other
> way?)

Yes.  Once you install VTK you can always write your own Makefile that 
adds all the -I, -L, and -l options needed to build with VTK.  However 
it is much easier to do this using CMake since the VTKConfig.cmake file 
knows all this information already.

 > but unfortunately glade uses gtk-2.0 (which is much nicer than
> 1.2) so the cmake module FindGTK.cmake doesn't fullfil my needs.
> 
> I found this FindGTK2.cmake but it does not build my project (yes I
> have pkg-config installed, when I run cmake . it does not build
> arguing that cmake.depends is up to date):
> 
> http://cvs.sourceforge.net/viewcvs.py/vxl/vxl/config/cmake/Modules/Attic/FindGTK2.cmake?view=markup
> 
> Any ideas  on how to build my app?

All this script does is set the GTK2_* variables it documents at the 
top.  It is up to your CMake code to use these values.  As far as make 
thinking your project is up to date we'll need more information.  Try a 
clean build from scratch after having modified your listfile code to use 
this FindGTK2 script.

Also, please submit a feature request to the bug tracker to have a 
FindGTK2 added to CMake:

http://www.cmake.org/Bug

and you will be notified automatically when it is implemented.

-Brad


More information about the CMake mailing list