Several fixes needed to improve Windows support
* Add support for detecting fontconfig.h header * Call find_package(Freetype) since it's required * Add support for allowing users to add additional library directories via the GTK2_ADDITIONAL_SUFFIXES variable (kind of a future-kludge in case the GTK developers change versions on any of the directories in the future). * Fixed a problem on Windows where you had to configure twice to find the gtk & gdk libraries
This commit is contained in:
parent
74a12f3042
commit
f6ca76f195
|
@ -28,6 +28,8 @@
|
||||||
#
|
#
|
||||||
# GTK2_DEBUG - Enables verbose debugging of the module
|
# GTK2_DEBUG - Enables verbose debugging of the module
|
||||||
# GTK2_SKIP_MARK_AS_ADVANCED - Disable marking cache variables as advanced
|
# GTK2_SKIP_MARK_AS_ADVANCED - Disable marking cache variables as advanced
|
||||||
|
# GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to
|
||||||
|
# search for include files
|
||||||
#
|
#
|
||||||
#=================
|
#=================
|
||||||
# Example Usage:
|
# Example Usage:
|
||||||
|
@ -64,6 +66,15 @@
|
||||||
# (To distribute this file outside of CMake, substitute the full
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
# Version 1.0 (8/12/2010)
|
||||||
|
# * Add support for detecting new pangommconfig.h header file
|
||||||
|
# (Thanks to Sune Vuorela & the Debian Project for the patch)
|
||||||
|
# * Add support for detecting fontconfig.h header
|
||||||
|
# * Call find_package(Freetype) since it's required
|
||||||
|
# * Add support for allowing users to add additional library directories
|
||||||
|
# via the GTK2_ADDITIONAL_SUFFIXES variable (kind of a future-kludge in
|
||||||
|
# case the GTK developers change versions on any of the directories in the
|
||||||
|
# future).
|
||||||
# Version 0.8 (1/4/2010)
|
# Version 0.8 (1/4/2010)
|
||||||
# * Get module working under MacOSX fink by adding /sw/include, /sw/lib
|
# * Get module working under MacOSX fink by adding /sw/include, /sw/lib
|
||||||
# to PATHS and the gobject library
|
# to PATHS and the gobject library
|
||||||
|
@ -131,7 +142,8 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(_relatives
|
set(_relatives
|
||||||
# FIXME
|
# If these ever change, things will break.
|
||||||
|
${GTK2_ADDITIONAL_SUFFIXES}
|
||||||
glibmm-2.4
|
glibmm-2.4
|
||||||
glib-2.0
|
glib-2.0
|
||||||
atk-1.0
|
atk-1.0
|
||||||
|
@ -390,6 +402,10 @@ endif()
|
||||||
# Find all components
|
# Find all components
|
||||||
#
|
#
|
||||||
|
|
||||||
|
find_package(Freetype)
|
||||||
|
list(APPEND GTK2_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS})
|
||||||
|
list(APPEND GTK2_LIBRARIES ${FREETYPE_LIBRARIES})
|
||||||
|
|
||||||
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
||||||
if(_GTK2_component STREQUAL "gtk")
|
if(_GTK2_component STREQUAL "gtk")
|
||||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
|
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
|
||||||
|
@ -401,16 +417,21 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
||||||
|
|
||||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
|
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
|
||||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
|
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
|
||||||
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true)
|
|
||||||
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true)
|
|
||||||
|
|
||||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h)
|
_GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h)
|
||||||
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-x11 false true)
|
|
||||||
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-win32 false true)
|
if(UNIX)
|
||||||
|
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true)
|
||||||
|
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-x11 false true)
|
||||||
|
else()
|
||||||
|
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true)
|
||||||
|
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-win32 false true)
|
||||||
|
endif()
|
||||||
|
|
||||||
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO_INCLUDE_DIR cairo.h)
|
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO_INCLUDE_DIR cairo.h)
|
||||||
_GTK2_FIND_LIBRARY (GTK2_CAIRO_LIBRARY cairo false false)
|
_GTK2_FIND_LIBRARY (GTK2_CAIRO_LIBRARY cairo false false)
|
||||||
|
|
||||||
|
_GTK2_FIND_INCLUDE_DIR(GTK2_FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h)
|
||||||
|
|
||||||
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGO_INCLUDE_DIR pango/pango.h)
|
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGO_INCLUDE_DIR pango/pango.h)
|
||||||
_GTK2_FIND_LIBRARY (GTK2_PANGO_LIBRARY pango false true)
|
_GTK2_FIND_LIBRARY (GTK2_PANGO_LIBRARY pango false true)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue