2 # try to find GTK (and glib) and GTKGLArea
5 # GTK_INCLUDE_DIR - Directories to include to use GTK
6 # GTK_LIBRARIES - Files to link against to use GTK
7 # GTK_FOUND - If false, don't try to use GTK
8 # GTK_GL_FOUND - If false, don't try to use GTK's GL features
10 # don't even bother under WIN32
13 FIND_PATH( GTK_gtk_INCLUDE_PATH gtk/gtk.h
16 /usr/openwin/share/include
20 /usr/X11R6/include/gtk12
22 /usr/local/include/gtk-1.2
26 # Some Linux distributions (e.g. Red Hat) have glibconfig.h
27 # and glib.h in different directories, so we need to look
29 # - Atanas Georgiev <atanas@cs.columbia.edu>
31 FIND_PATH( GTK_glibconfig_INCLUDE_PATH glibconfig.h
34 /usr/openwin/share/include
35 /usr/local/include/glib12
37 /usr/local/lib/glib/include
39 /opt/gnome/lib/glib/include
42 FIND_PATH( GTK_glib_INCLUDE_PATH glib.h
45 /usr/openwin/share/include
47 /usr/local/include/glib12
50 /usr/local/include/glib-1.2
52 /opt/gnome/include/glib-1.2
55 FIND_PATH( GTK_gtkgl_INCLUDE_PATH gtkgl/gtkglarea.h
58 /usr/openwin/share/include
62 FIND_LIBRARY( GTK_gtkgl_LIBRARY gtkgl
71 # The 12 suffix is thanks to the FreeBSD ports collection
74 FIND_LIBRARY( GTK_gtk_LIBRARY
83 FIND_LIBRARY( GTK_gdk_LIBRARY
92 FIND_LIBRARY( GTK_gmodule_LIBRARY
93 NAMES gmodule gmodule12
101 FIND_LIBRARY( GTK_glib_LIBRARY
110 FIND_LIBRARY( GTK_Xi_LIBRARY
119 FIND_LIBRARY( GTK_gthread_LIBRARY
120 NAMES gthread gthread12
128 IF(GTK_gtk_INCLUDE_PATH)
129 IF(GTK_glibconfig_INCLUDE_PATH)
130 IF(GTK_glib_INCLUDE_PATH)
134 # Assume that if gtk and glib were found, the other
135 # supporting libraries have also been found.
137 SET( GTK_FOUND "YES" )
138 SET( GTK_INCLUDE_DIR ${GTK_gtk_INCLUDE_PATH}
139 ${GTK_glibconfig_INCLUDE_PATH}
140 ${GTK_glib_INCLUDE_PATH} )
141 SET( GTK_LIBRARIES ${GTK_gtk_LIBRARY}
143 ${GTK_glib_LIBRARY} )
145 IF(GTK_gmodule_LIBRARY)
146 SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gmodule_LIBRARY})
147 ENDIF(GTK_gmodule_LIBRARY)
148 IF(GTK_gthread_LIBRARY)
149 SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gthread_LIBRARY})
150 ENDIF(GTK_gthread_LIBRARY)
152 SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY})
153 ENDIF(GTK_Xi_LIBRARY)
155 IF(GTK_gtkgl_INCLUDE_PATH)
156 IF(GTK_gtkgl_LIBRARY)
157 SET( GTK_GL_FOUND "YES" )
158 SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR}
159 ${GTK_gtkgl_INCLUDE_PATH} )
160 SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} )
163 GTK_gtkgl_INCLUDE_PATH
165 ENDIF(GTK_gtkgl_LIBRARY)
166 ENDIF(GTK_gtkgl_INCLUDE_PATH)
168 ENDIF(GTK_glib_LIBRARY)
169 ENDIF(GTK_gtk_LIBRARY)
170 ENDIF(GTK_glib_INCLUDE_PATH)
171 ENDIF(GTK_glibconfig_INCLUDE_PATH)
172 ENDIF(GTK_gtk_INCLUDE_PATH)
176 GTK_glib_INCLUDE_PATH
178 GTK_glibconfig_INCLUDE_PATH
184 GTK_gtkgl_INCLUDE_PATH