[CMake] FindGTK.cmake or gtk-config?

Juan José Aja Fernández juan.aja at gmail.com
Mon Mar 21 15:55:46 EST 2005


Hi everyone.
I'm trying to develop an application using vtk and gtk, so I decided
to use the cmake module FindGTK.cmake (version 2.0.5).
I read two or three posts regarding that issue, but sincerely I didn't
understand them very well.

Apparently it finds gtk (I arranged my CMakeLists.txt to display a
confirmation message inside the IF (GTK_FOUND) statement) but gives a
lot of errors regarding the includes in gtk.h (also I had to change:
#include <gtk/gtk.h> to: #include </usr/include/gtk-1.2/gtk/gtk.h>
because the former made the compiler tell me that gtk/gtk.h was not
found).

I'm new to cmake, so I just wanted to know what's the proper way of
telling cmake to pass to the compiler the necesary flags to compile
with gtk.
Also if there is a way to edit my CMakeLists.txt to tell cmake to use
gtk-config (ala:  gcc source.c `gtk-config --cflags` \
`gtk-config --libs`) as it's supposed to be easier.

Thanks in advance.

Juan.


More information about the CMake mailing list