2001-05-04 19:35:47 +04:00
|
|
|
#
|
2002-09-03 01:34:45 +04:00
|
|
|
# try to find GTK (and glib) and GTKGLArea
|
2001-05-04 19:35:47 +04:00
|
|
|
#
|
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
# GTK_INCLUDE_DIR - Directories to include to use GTK
|
|
|
|
# GTK_LIBRARIES - Files to link against to use GTK
|
|
|
|
# GTK_FOUND - If false, don't try to use GTK
|
2003-11-13 01:44:17 +03:00
|
|
|
# GTK_GL_FOUND - If false, don't try to use GTK's GL features
|
2002-09-03 01:34:45 +04:00
|
|
|
|
2001-05-04 19:35:47 +04:00
|
|
|
# don't even bother under WIN32
|
2003-03-14 23:44:20 +03:00
|
|
|
IF(UNIX)
|
2001-05-04 19:35:47 +04:00
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
FIND_PATH( GTK_gtk_INCLUDE_PATH gtk/gtk.h
|
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
|
|
|
/usr/openwin/share/include
|
|
|
|
/usr/openwin/include
|
|
|
|
/usr/X11R6/include
|
|
|
|
/usr/include/X11
|
|
|
|
/usr/X11R6/include/gtk12
|
|
|
|
/usr/include/gtk-1.2
|
|
|
|
/usr/local/include/gtk-1.2
|
|
|
|
/opt/gnome/include
|
2001-05-04 19:35:47 +04:00
|
|
|
)
|
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
# Some Linux distributions (e.g. Red Hat) have glibconfig.h
|
|
|
|
# and glib.h in different directories, so we need to look
|
|
|
|
# for both.
|
|
|
|
# - Atanas Georgiev <atanas@cs.columbia.edu>
|
|
|
|
|
|
|
|
FIND_PATH( GTK_glibconfig_INCLUDE_PATH glibconfig.h
|
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
|
|
|
/usr/openwin/share/include
|
|
|
|
/usr/local/include/glib12
|
|
|
|
/usr/lib/glib/include
|
|
|
|
/usr/local/lib/glib/include
|
|
|
|
/opt/gnome/include
|
|
|
|
/opt/gnome/lib/glib/include
|
2001-05-04 19:35:47 +04:00
|
|
|
)
|
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
FIND_PATH( GTK_glib_INCLUDE_PATH glib.h
|
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
|
|
|
/usr/openwin/share/include
|
|
|
|
/usr/include/gtk-1.2
|
|
|
|
/usr/local/include/glib12
|
|
|
|
/usr/lib/glib/include
|
|
|
|
/usr/include/glib-1.2
|
|
|
|
/usr/local/include/glib-1.2
|
|
|
|
/opt/gnome/include
|
|
|
|
/opt/gnome/include/glib-1.2
|
2001-05-04 19:35:47 +04:00
|
|
|
)
|
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
FIND_PATH( GTK_gtkgl_INCLUDE_PATH gtkgl/gtkglarea.h
|
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
|
|
|
/usr/openwin/share/include
|
|
|
|
/opt/gnome/include
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY( GTK_gtkgl_LIBRARY gtkgl
|
|
|
|
/usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/opt/gnome/lib
|
|
|
|
)
|
|
|
|
|
|
|
|
#
|
|
|
|
# The 12 suffix is thanks to the FreeBSD ports collection
|
|
|
|
#
|
|
|
|
|
|
|
|
FIND_LIBRARY( GTK_gtk_LIBRARY
|
|
|
|
NAMES gtk gtk12
|
|
|
|
PATHS /usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/opt/gnome/lib
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY( GTK_gdk_LIBRARY
|
|
|
|
NAMES gdk gdk12
|
|
|
|
PATHS /usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/opt/gnome/lib
|
|
|
|
)
|
2001-05-04 19:35:47 +04:00
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
FIND_LIBRARY( GTK_gmodule_LIBRARY
|
|
|
|
NAMES gmodule gmodule12
|
|
|
|
PATHS /usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/opt/gnome/lib
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY( GTK_glib_LIBRARY
|
|
|
|
NAMES glib glib12
|
|
|
|
PATHS /usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/opt/gnome/lib
|
|
|
|
)
|
|
|
|
|
2004-04-23 01:08:20 +04:00
|
|
|
FIND_LIBRARY( GTK_Xi_LIBRARY
|
|
|
|
NAMES Xi
|
|
|
|
PATHS /usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/opt/gnome/lib
|
|
|
|
)
|
|
|
|
|
2003-03-17 04:23:55 +03:00
|
|
|
FIND_LIBRARY( GTK_gthread_LIBRARY
|
|
|
|
NAMES gthread gthread12
|
|
|
|
PATHS /usr/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/opt/gnome/lib
|
|
|
|
)
|
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
IF(GTK_gtk_INCLUDE_PATH)
|
|
|
|
IF(GTK_glibconfig_INCLUDE_PATH)
|
|
|
|
IF(GTK_glib_INCLUDE_PATH)
|
|
|
|
IF(GTK_gtk_LIBRARY)
|
|
|
|
IF(GTK_glib_LIBRARY)
|
|
|
|
|
|
|
|
# Assume that if gtk and glib were found, the other
|
|
|
|
# supporting libraries have also been found.
|
|
|
|
|
|
|
|
SET( GTK_FOUND "YES" )
|
|
|
|
SET( GTK_INCLUDE_DIR ${GTK_gtk_INCLUDE_PATH}
|
|
|
|
${GTK_glibconfig_INCLUDE_PATH}
|
2002-09-18 16:15:04 +04:00
|
|
|
${GTK_glib_INCLUDE_PATH} )
|
|
|
|
SET( GTK_LIBRARIES ${GTK_gtk_LIBRARY}
|
2002-09-03 01:34:45 +04:00
|
|
|
${GTK_gdk_LIBRARY}
|
2002-09-18 16:15:04 +04:00
|
|
|
${GTK_glib_LIBRARY} )
|
2003-11-13 01:44:17 +03:00
|
|
|
|
|
|
|
IF(GTK_gmodule_LIBRARY)
|
|
|
|
SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gmodule_LIBRARY})
|
|
|
|
ENDIF(GTK_gmodule_LIBRARY)
|
2003-03-17 04:23:55 +03:00
|
|
|
IF(GTK_gthread_LIBRARY)
|
|
|
|
SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gthread_LIBRARY})
|
|
|
|
ENDIF(GTK_gthread_LIBRARY)
|
2004-04-23 01:08:20 +04:00
|
|
|
IF(GTK_Xi_LIBRARY)
|
|
|
|
SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY})
|
|
|
|
ENDIF(GTK_Xi_LIBRARY)
|
2002-09-18 16:15:04 +04:00
|
|
|
|
|
|
|
IF(GTK_gtkgl_INCLUDE_PATH)
|
|
|
|
IF(GTK_gtkgl_LIBRARY)
|
|
|
|
SET( GTK_GL_FOUND "YES" )
|
|
|
|
SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR}
|
|
|
|
${GTK_gtkgl_INCLUDE_PATH} )
|
2004-05-07 18:16:53 +04:00
|
|
|
SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} )
|
2002-09-18 16:15:04 +04:00
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
GTK_gtkgl_LIBRARY
|
|
|
|
GTK_gtkgl_INCLUDE_PATH
|
|
|
|
)
|
2002-09-03 01:34:45 +04:00
|
|
|
ENDIF(GTK_gtkgl_LIBRARY)
|
2002-09-18 16:15:04 +04:00
|
|
|
ENDIF(GTK_gtkgl_INCLUDE_PATH)
|
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
ENDIF(GTK_glib_LIBRARY)
|
|
|
|
ENDIF(GTK_gtk_LIBRARY)
|
2003-03-14 23:44:20 +03:00
|
|
|
ENDIF(GTK_glib_INCLUDE_PATH)
|
2002-09-03 01:34:45 +04:00
|
|
|
ENDIF(GTK_glibconfig_INCLUDE_PATH)
|
|
|
|
ENDIF(GTK_gtk_INCLUDE_PATH)
|
|
|
|
|
2002-09-05 20:00:45 +04:00
|
|
|
MARK_AS_ADVANCED(
|
2003-03-17 04:25:14 +03:00
|
|
|
GTK_gdk_LIBRARY
|
|
|
|
GTK_glib_INCLUDE_PATH
|
2002-09-05 20:00:45 +04:00
|
|
|
GTK_glib_LIBRARY
|
|
|
|
GTK_glibconfig_INCLUDE_PATH
|
2003-03-17 04:25:14 +03:00
|
|
|
GTK_gmodule_LIBRARY
|
|
|
|
GTK_gthread_LIBRARY
|
2004-04-23 01:08:20 +04:00
|
|
|
GTK_Xi_LIBRARY
|
2002-09-05 20:00:45 +04:00
|
|
|
GTK_gtk_INCLUDE_PATH
|
2003-03-17 04:25:14 +03:00
|
|
|
GTK_gtk_LIBRARY
|
|
|
|
GTK_gtkgl_INCLUDE_PATH
|
|
|
|
GTK_gtkgl_LIBRARY
|
2002-09-05 20:00:45 +04:00
|
|
|
)
|
2002-09-03 01:34:45 +04:00
|
|
|
|
2003-03-14 23:44:20 +03:00
|
|
|
ENDIF(UNIX)
|
2002-09-05 20:00:45 +04:00
|
|
|
|