diff options
Diffstat (limited to 'Modules/FindGTK.cmake')
-rw-r--r-- | Modules/FindGTK.cmake | 116 |
1 files changed, 41 insertions, 75 deletions
diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake index b3cbe50..7d80241 100644 --- a/Modules/FindGTK.cmake +++ b/Modules/FindGTK.cmake @@ -7,16 +7,11 @@ # don't even bother under WIN32 IF(UNIX) - FIND_PATH( GTK_gtk_INCLUDE_PATH gtk/gtk.h - /usr/include - /usr/local/include + FIND_PATH( GTK_gtk_INCLUDE_PATH NAMES gtk/gtk.h + PATH_SUFFIXES gtk-1.2 gtk12 + PATHS /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 ) @@ -25,9 +20,8 @@ IF(UNIX) # for both. # - Atanas Georgiev <atanas@cs.columbia.edu> - FIND_PATH( GTK_glibconfig_INCLUDE_PATH glibconfig.h - /usr/include - /usr/local/include + FIND_PATH( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h + PATHS /usr/openwin/share/include /usr/local/include/glib12 /usr/lib/glib/include @@ -36,31 +30,21 @@ IF(UNIX) /opt/gnome/lib/glib/include ) - FIND_PATH( GTK_glib_INCLUDE_PATH glib.h - /usr/include - /usr/local/include + FIND_PATH( GTK_glib_INCLUDE_PATH NAMES glib.h + PATH_SUFFIXES gtk-1.2 glib-1.2 glib12 + PATHS /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 ) - FIND_PATH( GTK_gtkgl_INCLUDE_PATH gtkgl/gtkglarea.h - /usr/include - /usr/local/include - /usr/openwin/share/include - /opt/gnome/include + FIND_PATH( GTK_gtkgl_INCLUDE_PATH NAMES gtkgl/gtkglarea.h + PATHS /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 ) @@ -70,63 +54,45 @@ IF(UNIX) FIND_LIBRARY( GTK_gtk_LIBRARY NAMES gtk gtk12 - PATHS /usr/lib - /usr/local/lib - /usr/openwin/lib - /usr/X11R6/lib + PATHS /usr/openwin/lib /opt/gnome/lib ) FIND_LIBRARY( GTK_gdk_LIBRARY NAMES gdk gdk12 - PATHS /usr/lib - /usr/local/lib - /usr/openwin/lib - /usr/X11R6/lib + PATHS /usr/openwin/lib /opt/gnome/lib ) FIND_LIBRARY( GTK_gmodule_LIBRARY NAMES gmodule gmodule12 - PATHS /usr/lib - /usr/local/lib - /usr/openwin/lib - /usr/X11R6/lib + PATHS /usr/openwin/lib /opt/gnome/lib ) FIND_LIBRARY( GTK_glib_LIBRARY NAMES glib glib12 - PATHS /usr/lib - /usr/local/lib - /usr/openwin/lib - /usr/X11R6/lib + PATHS /usr/openwin/lib /opt/gnome/lib ) FIND_LIBRARY( GTK_Xi_LIBRARY NAMES Xi - PATHS /usr/lib - /usr/local/lib - /usr/openwin/lib - /usr/X11R6/lib - /opt/gnome/lib + PATHS /usr/openwin/lib + /opt/gnome/lib ) FIND_LIBRARY( GTK_gthread_LIBRARY NAMES gthread gthread12 - PATHS /usr/lib - /usr/local/lib - /usr/openwin/lib - /usr/X11R6/lib + PATHS /usr/openwin/lib /opt/gnome/lib ) - IF(GTK_gtk_INCLUDE_PATH) - IF(GTK_glibconfig_INCLUDE_PATH) - IF(GTK_glib_INCLUDE_PATH) - IF(GTK_gtk_LIBRARY) - IF(GTK_glib_LIBRARY) + IF(GTK_gtk_INCLUDE_PATH + AND GTK_glibconfig_INCLUDE_PATH + AND GTK_glib_INCLUDE_PATH + AND GTK_gtk_LIBRARY + AND GTK_glib_LIBRARY) # Assume that if gtk and glib were found, the other # supporting libraries have also been found. @@ -149,24 +115,22 @@ IF(UNIX) SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY}) ENDIF(GTK_Xi_LIBRARY) - 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} ) - SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} ) - MARK_AS_ADVANCED( - GTK_gtkgl_LIBRARY - GTK_gtkgl_INCLUDE_PATH - ) - ENDIF(GTK_gtkgl_LIBRARY) - ENDIF(GTK_gtkgl_INCLUDE_PATH) - - ENDIF(GTK_glib_LIBRARY) - ENDIF(GTK_gtk_LIBRARY) - ENDIF(GTK_glib_INCLUDE_PATH) - ENDIF(GTK_glibconfig_INCLUDE_PATH) - ENDIF(GTK_gtk_INCLUDE_PATH) + IF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY) + SET( GTK_GL_FOUND "YES" ) + SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR} + ${GTK_gtkgl_INCLUDE_PATH} ) + SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} ) + MARK_AS_ADVANCED( + GTK_gtkgl_LIBRARY + GTK_gtkgl_INCLUDE_PATH + ) + ENDIF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY) + + ENDIF(GTK_gtk_INCLUDE_PATH + AND GTK_glibconfig_INCLUDE_PATH + AND GTK_glib_INCLUDE_PATH + AND GTK_gtk_LIBRARY + AND GTK_glib_LIBRARY) MARK_AS_ADVANCED( GTK_gdk_LIBRARY @@ -184,3 +148,5 @@ IF(UNIX) ENDIF(UNIX) + + |