2 IF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
5 ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
7 # use pkg-config to get the directories and then use these values
8 # in the FIND_PATH() and FIND_LIBRARY() calls
11 PKGCONFIG(gtk-2.0 _GTK22IncDir _GTK22LinkDir _GTK22LinkFlags _GTK22Cflags)
13 FIND_PATH(GTK2_GTK_INCLUDE_PATH gtk/gtk.h
17 /usr/local/include/gtk-2.0
19 /opt/gnome/include/gtk-2.0
23 # Some Linux distributions (e.g. Red Hat) have glibconfig.h
24 # and glib.h in different directories, so we need to look
26 # - Atanas Georgiev <atanas@cs.columbia.edu>
27 PKGCONFIG(glib-2.0 _GLIB2IncDir _GLIB2inkDir _GLIB2LinkFlags _GLIB2Cflags)
28 PKGCONFIG(gmodule-2.0 _GMODULE2IncDir _GMODULE2inkDir _GMODULE2LinkFlags _GMODULE2Cflags)
29 SET(GDIR /opt/gnome/lib/glib-2.0/include)
31 FIND_PATH(GTK2_GLIBCONFIG_INCLUDE_PATH glibconfig.h
33 /opt/gnome/lib64/glib-2.0/include
34 /opt/gnome/lib/glib-2.0/include
35 /opt/lib/glib-2.0/include
36 /usr/lib64/glib-2.0/include
37 /usr/lib/glib-2.0/include
38 /sw/lib/glib-2.0/include
40 #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
42 FIND_PATH(GTK2_GLIB_INCLUDE_PATH glib.h
45 /opt/gnome/include/glib-2.0
49 #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
51 FIND_PATH(GTK2_GTKGL_INCLUDE_PATH gtkgl/gtkglarea.h
55 /usr/openwin/share/include
61 PKGCONFIG(pango _PANGOIncDir _PANGOinkDir _PANGOLinkFlags _PANGOCflags)
63 FIND_PATH(GTK2_PANGO_INCLUDE_PATH pango/pango.h
65 /opt/gnome/include/pango-1.0
66 /opt/include/pango-1.0
67 /usr/include/pango-1.0
71 PKGCONFIG(gdk-2.0 _GDK2IncDir _GDK2inkDir _GDK2LinkFlags _GDK2Cflags)
73 FIND_PATH(GTK2_GDKCONFIG_INCLUDE_PATH gdkconfig.h
75 /opt/gnome/lib/gtk-2.0/include
76 /opt/gnome/lib64/gtk-2.0/include
77 /opt/lib/gtk-2.0/include
78 /usr/lib/gtk-2.0/include
79 /usr/lib64/gtk-2.0/include
80 /sw/lib/gtk-2.0/include
84 FIND_PATH(GTK2_GDK_INCLUDE_PATH gdk.h
87 /usr/include/gtk-2.0/gdk
89 #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
91 PKGCONFIG(cairo _CAIROIncDir _CAIROinkDir _CAIROLinkFlags _CAIROCflags)
93 FIND_PATH(GTK2_CAIRO_INCLUDE_PATH cairo.h
95 /opt/gnome/include/cairo
103 #MESSAGE(STATUS "DEBUG: GTK2_CAIRO_INCLUDE_PATH = ${GTK2_CAIRO_INCLUDE_PATH}")
105 PKGCONFIG(atk _ATKIncDir _ATKinkDir _ATKLinkFlags _ATKCflags)
107 FIND_PATH(GTK2_ATK_INCLUDE_PATH atk/atk.h
109 /opt/gnome/include/atk-1.0
114 #MESSAGE(STATUS "DEBUG: GTK2_ATK_INCLUDE_PATH = ${GTK2_ATK_INCLUDE_PATH}")
116 FIND_LIBRARY(GTK2_GTKGL_LIBRARY
130 FIND_LIBRARY(GTK2_GTK_LIBRARY
144 FIND_LIBRARY(GTK2_GDK_LIBRARY
158 FIND_LIBRARY(GTK2_GMODULE_LIBRARY
172 FIND_LIBRARY(GTK2_GLIB_LIBRARY
186 FIND_LIBRARY(GTK2_Xi_LIBRARY
199 FIND_LIBRARY(GTK2_GTHREAD_LIBRARY
213 FIND_LIBRARY(GTK2_GOBJECT_LIBRARY
226 IF(GTK2_GTK_INCLUDE_PATH)
227 IF(GTK2_GLIBCONFIG_INCLUDE_PATH)
228 IF(GTK2_GLIB_INCLUDE_PATH)
230 IF(GTK2_GLIB_LIBRARY)
231 IF(GTK2_PANGO_INCLUDE_PATH)
232 IF(GTK2_ATK_INCLUDE_PATH)
233 IF(GTK2_CAIRO_INCLUDE_PATH)
234 # Assume that if gtk and glib were found, the other
235 # supporting libraries have also been found.
239 SET(GTK2_INCLUDE_DIRS
240 ${GTK2_GTK_INCLUDE_PATH}
241 ${GTK2_GLIBCONFIG_INCLUDE_PATH}
242 ${GTK2_GLIB_INCLUDE_PATH}
243 ${GTK2_PANGO_INCLUDE_PATH}
244 ${GTK2_GDKCONFIG_INCLUDE_PATH}
246 ${GTK2_GDK_INCLUDE_PATH}
247 ${GTK2_ATK_INCLUDE_PATH}
248 ${GTK2_CAIRO_INCLUDE_PATH}
256 #${GTK2_GOBJECT_LIBRARY})
258 IF(GTK2_GMODULE_LIBRARY)
261 ${GTK2_GMODULE_LIBRARY}
263 ENDIF(GTK2_GMODULE_LIBRARY)
265 IF(GTK2_GTHREAD_LIBRARY)
268 ${GTK2_GTHREAD_LIBRARY}
270 SET(GTK2_LIBRARIES ${GTK2_LIBRARIES})
271 ENDIF(GTK2_GTHREAD_LIBRARY)
272 ELSE(GTK2_CAIRO_INCLUDE_PATH)
273 MESSAGE(STATUS "Can not find cairo")
274 ENDIF(GTK2_CAIRO_INCLUDE_PATH)
275 ELSE(GTK2_ATK_INCLUDE_PATH)
276 MESSAGE(STATUS "Can not find atk")
277 ENDIF(GTK2_ATK_INCLUDE_PATH)
278 ELSE(GTK2_PANGO_INCLUDE_PATH)
279 MESSAGE(STATUS "Can not find pango includes")
280 ENDIF(GTK2_PANGO_INCLUDE_PATH)
281 ELSE(GTK2_GLIB_LIBRARY)
282 MESSAGE(STATUS "Can not find glib lib")
283 ENDIF(GTK2_GLIB_LIBRARY)
284 ELSE(GTK2_GTK_LIBRARY)
285 MESSAGE(STATUS "Can not find gtk lib")
286 ENDIF(GTK2_GTK_LIBRARY)
287 ELSE(GTK2_GLIB_INCLUDE_PATH)
288 MESSAGE(STATUS "Can not find glib includes")
289 ENDIF(GTK2_GLIB_INCLUDE_PATH)
290 ELSE(GTK2_GLIBCONFIG_INCLUDE_PATH)
291 MESSAGE(STATUS "Can not find glibconfig")
292 ENDIF(GTK2_GLIBCONFIG_INCLUDE_PATH)
293 ELSE (GTK2_GTK_INCLUDE_PATH)
294 MESSAGE(STATUS "Can not find gtk includes")
295 ENDIF (GTK2_GTK_INCLUDE_PATH)
298 IF (NOT GTK2_FIND_QUIETLY)
299 MESSAGE(STATUS "Found GTK2: ${GTK2_LIBRARIES}")
300 ENDIF (NOT GTK2_FIND_QUIETLY)
302 IF (GTK2_FIND_REQUIRED)
303 MESSAGE(SEND_ERROR "Could NOT find GTK2")
304 ENDIF (GTK2_FIND_REQUIRED)
309 GTK2_GLIB_INCLUDE_PATH
311 GTK2_GLIBCONFIG_INCLUDE_PATH
315 GTK2_GTK_INCLUDE_PATH
317 GTK2_GTKGL_INCLUDE_PATH
319 GTK2_ATK_INCLUDE_PATH
320 GTK2_GDKCONFIG_INCLUDE_PATH
322 GTK2_GDK_INCLUDE_PATH
323 #GTK2_GOBJECT_LIBRARY
324 GTK2_PANGO_INCLUDE_PATH
326 GTK2_CAIRO_INCLUDE_PATH
330 ENDIF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)