1 # - try to find GTK (and glib) and GTKGLArea
2 # GTK_INCLUDE_DIR - Directories to include to use GTK
3 # GTK_LIBRARIES - Files to link against to use GTK
4 # GTK_FOUND - GTK was found
5 # GTK_GL_FOUND - GTK's GL features were found
7 # don't even bother under WIN32
10 FIND_PATH( GTK_gtk_INCLUDE_PATH NAMES gtk/gtk.h
11 PATH_SUFFIXES gtk-1.2 gtk12
13 /usr/openwin/share/include
18 # Some Linux distributions (e.g. Red Hat) have glibconfig.h
19 # and glib.h in different directories, so we need to look
21 # - Atanas Georgiev <atanas@cs.columbia.edu>
23 FIND_PATH( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h
25 /usr/openwin/share/include
26 /usr/local/include/glib12
28 /usr/local/lib/glib/include
30 /opt/gnome/lib/glib/include
33 FIND_PATH( GTK_glib_INCLUDE_PATH NAMES glib.h
34 PATH_SUFFIXES gtk-1.2 glib-1.2 glib12
36 /usr/openwin/share/include
41 FIND_PATH( GTK_gtkgl_INCLUDE_PATH NAMES gtkgl/gtkglarea.h
42 PATHS /usr/openwin/share/include
46 FIND_LIBRARY( GTK_gtkgl_LIBRARY gtkgl
52 # The 12 suffix is thanks to the FreeBSD ports collection
55 FIND_LIBRARY( GTK_gtk_LIBRARY
57 PATHS /usr/openwin/lib
61 FIND_LIBRARY( GTK_gdk_LIBRARY
63 PATHS /usr/openwin/lib
67 FIND_LIBRARY( GTK_gmodule_LIBRARY
68 NAMES gmodule gmodule12
69 PATHS /usr/openwin/lib
73 FIND_LIBRARY( GTK_glib_LIBRARY
75 PATHS /usr/openwin/lib
79 FIND_LIBRARY( GTK_Xi_LIBRARY
81 PATHS /usr/openwin/lib
85 FIND_LIBRARY( GTK_gthread_LIBRARY
86 NAMES gthread gthread12
87 PATHS /usr/openwin/lib
91 IF(GTK_gtk_INCLUDE_PATH
92 AND GTK_glibconfig_INCLUDE_PATH
93 AND GTK_glib_INCLUDE_PATH
97 # Assume that if gtk and glib were found, the other
98 # supporting libraries have also been found.
100 SET( GTK_FOUND "YES" )
101 SET( GTK_INCLUDE_DIR ${GTK_gtk_INCLUDE_PATH}
102 ${GTK_glibconfig_INCLUDE_PATH}
103 ${GTK_glib_INCLUDE_PATH} )
104 SET( GTK_LIBRARIES ${GTK_gtk_LIBRARY}
106 ${GTK_glib_LIBRARY} )
108 IF(GTK_gmodule_LIBRARY)
109 SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gmodule_LIBRARY})
110 ENDIF(GTK_gmodule_LIBRARY)
111 IF(GTK_gthread_LIBRARY)
112 SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gthread_LIBRARY})
113 ENDIF(GTK_gthread_LIBRARY)
115 SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY})
116 ENDIF(GTK_Xi_LIBRARY)
118 IF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
119 SET( GTK_GL_FOUND "YES" )
120 SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR}
121 ${GTK_gtkgl_INCLUDE_PATH} )
122 SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} )
125 GTK_gtkgl_INCLUDE_PATH
127 ENDIF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
129 ENDIF(GTK_gtk_INCLUDE_PATH
130 AND GTK_glibconfig_INCLUDE_PATH
131 AND GTK_glib_INCLUDE_PATH
133 AND GTK_glib_LIBRARY)
137 GTK_glib_INCLUDE_PATH
139 GTK_glibconfig_INCLUDE_PATH
145 GTK_gtkgl_INCLUDE_PATH