1 All files in this directory are dual licensed by the licenses
2 included below, unless the individual license of a file says
7 ###################################################################
9 # Copyright (c) 2004 Jan Woetzel
10 # Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
12 # This program is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU General Public License
14 # as published by the Free Software Foundation; either version 2
15 # of the License, or (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 # Boston, MA 02110-1301, USA.
27 ###################################################################
29 # Copyright (c) 2004 Jan Woetzel
30 # Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
31 # All rights reserved.
33 # Redistribution and use in source and binary forms, with or without
34 # modification, are permitted provided that the following conditions
37 # * Redistributions of source code must retain the above copyright
38 # notice, this list of conditions and the following disclaimer.
40 # * Redistributions in binary form must reproduce the above copyright
41 # notice, this list of conditions and the following disclaimer in
42 # the documentation and/or other materials provided with the
45 # * Neither the name of the <ORGANIZATION> nor the names of its
46 # contributors may be used to endorse or promote products derived
47 # from this software without specific prior written permission.
49 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
52 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
53 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
56 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
57 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
59 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
60 # POSSIBILITY OF SUCH DAMAGE.
63 IF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
66 ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
68 # use pkg-config to get the directories and then use these values
69 # in the FIND_PATH() and FIND_LIBRARY() calls
72 PKGCONFIG(gtk+-2.0 _GTK22IncDir _GTK22LinkDir _GTK22LinkFlags _GTK22Cflags)
74 FIND_PATH(GTK2_GTK_INCLUDE_PATH gtk/gtk.h
78 /usr/local/include/gtk-2.0
79 /opt/gnome/include/gtk-2.0
82 # Some Linux distributions (e.g. Red Hat) have glibconfig.h
83 # and glib.h in different directories, so we need to look
85 # - Atanas Georgiev <atanas@cs.columbia.edu>
86 PKGCONFIG(glib-2.0 _GLIB2IncDir _GLIB2inkDir _GLIB2LinkFlags _GLIB2Cflags)
87 PKGCONFIG(gmodule-2.0 _GMODULE2IncDir _GMODULE2inkDir _GMODULE2LinkFlags _GMODULE2Cflags)
88 SET(GDIR /opt/gnome/lib/glib-2.0/include)
89 FIND_PATH(GTK2_GLIBCONFIG_INCLUDE_PATH glibconfig.h
91 /opt/gnome/lib64/glib-2.0/include
92 /opt/gnome/lib/glib-2.0/include
93 /usr/lib64/glib-2.0/include
94 /usr/lib/glib-2.0/include
96 #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
98 FIND_PATH(GTK2_GLIB_INCLUDE_PATH glib.h
100 /opt/gnome/include/glib-2.0
101 /usr/include/glib-2.0
103 #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
105 FIND_PATH(GTK2_GTKGL_INCLUDE_PATH gtkgl/gtkglarea.h
109 /usr/openwin/share/include
113 PKGCONFIG(pango _PANGOIncDir _PANGOinkDir _PANGOLinkFlags _PANGOCflags)
115 FIND_PATH(GTK2_PANGO_INCLUDE_PATH pango/pango.h
117 /opt/gnome/include/pango-1.0
118 /usr/include/pango-1.0
121 PKGCONFIG(gdk-2.0 _GDK2IncDir _GDK2inkDir _GDK2LinkFlags _GDK2Cflags)
123 FIND_PATH(GTK2_GDKCONFIG_INCLUDE_PATH gdkconfig.h
125 /opt/gnome/lib/gtk-2.0/include
126 /opt/gnome/lib64/gtk-2.0/include
127 /usr/lib/gtk-2.0/include
128 /usr/lib64/gtk-2.0/include
131 PKGCONFIG(cairo _CAIROIncDir _CAIROinkDir _CAIROLinkFlags _CAIROCflags)
133 FIND_PATH(GTK2_CAIRO_INCLUDE_PATH cairo.h
135 /opt/gnome/include/cairo
139 #MESSAGE(STATUS "DEBUG: GTK2_CAIRO_INCLUDE_PATH = ${GTK2_CAIRO_INCLUDE_PATH}")
141 PKGCONFIG(atk _ATKIncDir _ATKinkDir _ATKLinkFlags _ATKCflags)
143 FIND_PATH(GTK2_ATK_INCLUDE_PATH atk/atk.h
145 /opt/gnome/include/atk-1.0
148 #MESSAGE(STATUS "DEBUG: GTK2_ATK_INCLUDE_PATH = ${GTK2_ATK_INCLUDE_PATH}")
150 FIND_LIBRARY(GTK2_GTKGL_LIBRARY
162 FIND_LIBRARY(GTK2_GTK_LIBRARY
174 FIND_LIBRARY(GTK2_GDK_LIBRARY
186 FIND_LIBRARY(GTK2_GMODULE_LIBRARY
198 FIND_LIBRARY(GTK2_GLIB_LIBRARY
210 FIND_LIBRARY(GTK2_Xi_LIBRARY
221 FIND_LIBRARY(GTK2_GTHREAD_LIBRARY
233 FIND_LIBRARY(GTK2_GOBJECT_LIBRARY
244 IF(GTK2_GTK_INCLUDE_PATH)
245 IF(GTK2_GLIBCONFIG_INCLUDE_PATH)
246 IF(GTK2_GLIB_INCLUDE_PATH)
248 IF(GTK2_GLIB_LIBRARY)
249 IF(GTK2_PANGO_INCLUDE_PATH)
250 IF(GTK2_ATK_INCLUDE_PATH)
251 IF(GTK2_CAIRO_INCLUDE_PATH)
252 # Assume that if gtk and glib were found, the other
253 # supporting libraries have also been found.
257 SET(GTK2_INCLUDE_DIRS
258 ${GTK2_GTK_INCLUDE_PATH}
259 ${GTK2_GLIBCONFIG_INCLUDE_PATH}
260 ${GTK2_GLIB_INCLUDE_PATH}
261 ${GTK2_PANGO_INCLUDE_PATH}
262 ${GTK2_GDKCONFIG_INCLUDE_PATH}
263 ${GTK2_ATK_INCLUDE_PATH}
264 ${GTK2_CAIRO_INCLUDE_PATH}
265 CACHE INTERNAL "The include directories for GTK2"
273 #${GTK2_GOBJECT_LIBRARY})
275 IF(GTK2_GMODULE_LIBRARY)
278 ${GTK2_GMODULE_LIBRARY}
280 ENDIF(GTK2_GMODULE_LIBRARY)
282 IF(GTK2_GTHREAD_LIBRARY)
285 ${GTK2_GTHREAD_LIBRARY}
287 SET(GTK2_LIBRARIES ${GTK2_LIBRARIES} CACHE INTERNAL "The libraries for GTK2"
288 ENDIF(GTK2_GTHREAD_LIBRARY)
289 ELSE(GTK2_CAIRO_INCLUDE_PATH)
290 MESSAGE(STATUS "Can not find cairo")
291 ENDIF(GTK2_CAIRO_INCLUDE_PATH)
292 ELSE(GTK2_ATK_INCLUDE_PATH)
293 MESSAGE(STATUS "Can not find atk")
294 ENDIF(GTK2_ATK_INCLUDE_PATH)
295 ELSE(GTK2_PANGO_INCLUDE_PATH)
296 MESSAGE(STATUS "Can not find pango includes")
297 ENDIF(GTK2_PANGO_INCLUDE_PATH)
298 ELSE(GTK2_GLIB_LIBRARY)
299 MESSAGE(STATUS "Can not find glib lib")
300 ENDIF(GTK2_GLIB_LIBRARY)
301 ELSE(GTK2_GTK_LIBRARY)
302 MESSAGE(STATUS "Can not find gtk lib")
303 ENDIF(GTK2_GTK_LIBRARY)
304 ELSE(GTK2_GLIB_INCLUDE_PATH)
305 MESSAGE(STATUS "Can not find glib includes")
306 ENDIF(GTK2_GLIB_INCLUDE_PATH)
307 ELSE(GTK2_GLIBCONFIG_INCLUDE_PATH)
308 MESSAGE(STATUS "Can not find glibconfig")
309 ENDIF(GTK2_GLIBCONFIG_INCLUDE_PATH)
310 ELSE (GTK2_GTK_INCLUDE_PATH)
311 MESSAGE(STATUS "Can not find gtk includes")
312 ENDIF (GTK2_GTK_INCLUDE_PATH)
315 IF (NOT GTK2_FIND_QUIETLY)
316 MESSAGE(STATUS "Found GTK2: ${GTK2_LIBRARIES}")
317 ENDIF (NOT GTK2_FIND_QUIETLY)
319 IF (GTK2_FIND_REQUIRED)
320 MESSAGE(SEND_ERROR "Could NOT find GTK2")
321 ENDIF (GTK2_FIND_REQUIRED)
326 GTK2_GLIB_INCLUDE_PATH
328 GTK2_GLIBCONFIG_INCLUDE_PATH
332 GTK2_GTK_INCLUDE_PATH
334 GTK2_GTKGL_INCLUDE_PATH
336 GTK2_ATK_INCLUDE_PATH
337 GTK2_GDKCONFIG_INCLUDE_PATH
338 #GTK2_GOBJECT_LIBRARY
339 GTK2_PANGO_INCLUDE_PATH
342 ENDIF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
344 # vim:et ts=2 sw=2 comments=\:\#