diff options
author | Ian Scott <ian.m.scott@stud.man.ac.uk> | 2002-09-02 21:34:45 (GMT) |
---|---|---|
committer | Ian Scott <ian.m.scott@stud.man.ac.uk> | 2002-09-02 21:34:45 (GMT) |
commit | a89dbfc1b9be897a2c9f0216d160185669ec795e (patch) | |
tree | 868bedc9d8d199da60710bbe5718f3e36c41ceb8 /Modules/FindGTK.cmake | |
parent | 0b1465ba3a34838c9454dece6e5f812d6965a014 (diff) | |
download | CMake-a89dbfc1b9be897a2c9f0216d160185669ec795e.zip CMake-a89dbfc1b9be897a2c9f0216d160185669ec795e.tar.gz CMake-a89dbfc1b9be897a2c9f0216d160185669ec795e.tar.bz2 |
Moved FLTK and GTK to new FindXXX scheme. Imported some functionality from VXL
Diffstat (limited to 'Modules/FindGTK.cmake')
-rw-r--r-- | Modules/FindGTK.cmake | 140 |
1 files changed, 128 insertions, 12 deletions
diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake index df6277e..846cd99 100644 --- a/Modules/FindGTK.cmake +++ b/Modules/FindGTK.cmake @@ -1,25 +1,141 @@ # -# try to find GTK +# try to find GTK (and glib) and GTKGLArea # +# 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 + # don't even bother under WIN32 IF (UNIX) - FIND_PATH(GTK_INCLUDE_PATH gtk/gtk.h - /usr/include - /usr/local/include - /usr/openwin/share/include + 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 ) - FIND_LIBRARY(GTK_LIB_PATH gtk - PATHS /usr/lib /usr/local/lib /usr/openwin/lib /usr/X11R6/lib + # 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 ) - FIND_PATH(GTK_GLIB_INCLUDE_PATH glibconfig.h - /usr/include - /usr/local/include - /usr/openwin/share/include + 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 ) -ENDIF (UNIX) + 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 + ) + 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 + ) + + IF(GTK_gtk_INCLUDE_PATH) + IF(GTK_glibconfig_INCLUDE_PATH) + IF(GTK_glib_INCLUDE_PATH) + IF(GTK_gtkgl_INCLUDE_PATH) + IF(GTK_gtk_LIBRARY) + IF(GTK_glib_LIBRARY) + IF(GTK_gtkgl_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} + ${GTK_glib_INCLUDE_PATH} + ${GTK_gtkgl_INCLUDE_PATH} ) + SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} + ${GTK_gtk_LIBRARY} + ${GTK_gdk_LIBRARY} + ${GTK_gmodule_LIBRARY} + ${GTK_glib_LIBRARY} ) + + ENDIF(GTK_gtkgl_LIBRARY) + ENDIF(GTK_glib_LIBRARY) + ENDIF(GTK_gtk_LIBRARY) + ENDIF(GTK_gtkgl_INCLUDE_PATH) + ENDIF(GTK_glibconfig_INCLUDE_PATH) + ENDIF(GTK_glib_INCLUDE_PATH) + ENDIF(GTK_gtk_INCLUDE_PATH) + + + +ENDIF (UNIX) |