Merge topic 'FindGTK2_fix_bsd'

d5a6069a FindGTK2: Add GTK2_(FONTCONFIG|X11)_INCLUDE_DIR optional includes
ef9366b0 FindGTK2: Add /usr/X11R6/ to include paths
This commit is contained in:
Brad King 2014-04-21 09:32:25 -04:00 committed by CMake Topic Stage
commit fd4ee2d86f

View File

@ -267,6 +267,8 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
/usr/local/lib
/usr/lib64
/usr/lib
/usr/X11R6/include
/usr/X11R6/lib
/opt/gnome/include
/opt/gnome/lib
/opt/openwin/include
@ -680,11 +682,15 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_LIBRARY (PANGOFT2 pangoft2 false true)
_GTK2_ADD_TARGET (PANGOFT2 GTK2_DEPENDS pango gobject glib
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
_GTK2_FIND_LIBRARY (PANGOXFT pangoxft false true)
_GTK2_ADD_TARGET (PANGOXFT GTK2_DEPENDS pangoft2 pango gobject glib
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
_GTK2_FIND_INCLUDE_DIR(GDK gdk/gdk.h)
_GTK2_FIND_INCLUDE_DIR(GDKCONFIG gdkconfig.h)
@ -715,8 +721,9 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_ADD_TARGET (GTK GTK2_DEPENDS gdk atk pangoft2 pango gdk_pixbuf gthread gobject glib
GTK2_OPTIONAL_DEPENDS gio pangocairo cairo)
# Left for compatibility with previous versions. It doesn't seem to be required
# Left for compatibility with previous versions.
_GTK2_FIND_INCLUDE_DIR(FONTCONFIG fontconfig/fontconfig.h)
_GTK2_FIND_INCLUDE_DIR(X11 X11/Xlib.h)
elseif(_GTK2_component STREQUAL "gtkmm")
@ -743,29 +750,36 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_INCLUDE_DIR(CAIROMMCONFIG cairommconfig.h)
_GTK2_FIND_LIBRARY (CAIROMM cairomm true true)
_GTK2_ADD_TARGET (CAIROMM GTK2_DEPENDS cairo sigc++
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
_GTK2_FIND_INCLUDE_DIR(PANGOMM pangomm.h)
_GTK2_FIND_INCLUDE_DIR(PANGOMMCONFIG pangommconfig.h)
_GTK2_FIND_LIBRARY (PANGOMM pangomm true true)
_GTK2_ADD_TARGET (PANGOMM GTK2_DEPENDS glibmm sigc++ pango gobject glib
GTK2_OPTIONAL_DEPENDS cairomm pangocairo cairo
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
_GTK2_FIND_INCLUDE_DIR(GDKMM gdkmm.h)
_GTK2_FIND_INCLUDE_DIR(GDKMMCONFIG gdkmmconfig.h)
_GTK2_FIND_LIBRARY (GDKMM gdkmm true true)
_GTK2_ADD_TARGET (GDKMM GTK2_DEPENDS pangomm gtk glibmm sigc++ gdk atk pangoft2 gdk_pixbuf pango gobject glib
GTK2_OPTIONAL_DEPENDS giomm cairomm gio pangocairo cairo
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
_GTK2_FIND_INCLUDE_DIR(GTKMM gtkmm.h)
_GTK2_FIND_INCLUDE_DIR(GTKMMCONFIG gtkmmconfig.h)
_GTK2_FIND_LIBRARY (GTKMM gtkmm true true)
_GTK2_ADD_TARGET (GTKMM GTK2_DEPENDS atkmm gdkmm pangomm gtk glibmm sigc++ gdk atk pangoft2 gdk_pixbuf pango gthread gobject glib
GTK2_OPTIONAL_DEPENDS giomm cairomm gio pangocairo cairo
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
elseif(_GTK2_component STREQUAL "glade")
@ -773,7 +787,9 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_LIBRARY (GLADE glade false true)
_GTK2_ADD_TARGET (GLADE GTK2_DEPENDS gtk gdk atk gio pangoft2 gdk_pixbuf pango gobject glib
GTK2_OPTIONAL_DEPENDS pangocairo cairo
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
elseif(_GTK2_component STREQUAL "glademm")
@ -782,7 +798,9 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
_GTK2_FIND_LIBRARY (GLADEMM glademm true true)
_GTK2_ADD_TARGET (GLADEMM GTK2_DEPENDS gtkmm glade atkmm gdkmm giomm pangomm glibmm sigc++ gtk gdk atk pangoft2 gdk_pixbuf pango gthread gobject glib
GTK2_OPTIONAL_DEPENDS giomm cairomm gio pangocairo cairo
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2})
OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
${GTK2_FONTCONFIG_INCLUDE_DIR}
${GTK2_X11_INCLUDE_DIR})
else()
message(FATAL_ERROR "Unknown GTK2 component ${_component}")