blob: 2353df3f392027f8e7ada5a93ff51bc61fb47742 [file] [log] [blame]
eric@webkit.orgd99f85b2010-05-15 13:37:59 +00001# - Try to find Pango
2# Once done, this will define
3#
4# Pango_FOUND - system has Pango
5# Pango_INCLUDE_DIRS - the Pango include directories
6# Pango_LIBRARIES - link these to use Pango
7
8include(LibFindMacros)
9
10# Dependencies
11libfind_package(Pango Freetype)
12
13# Use pkg-config to get hints about paths
14libfind_pkg_check_modules(Pango_PKGCONF pango)
commit-queue@webkit.org1cd9c172011-09-09 22:06:03 +000015libfind_pkg_check_modules(Pango_Cairo_PKGCONF pango)
eric@webkit.orgd99f85b2010-05-15 13:37:59 +000016
17# Include dir
18find_path(Pango_INCLUDE_DIR
19 NAMES pango/pango.h
20 PATHS ${Pango_PKGCONF_INCLUDE_DIRS}
21 PATH_SUFFIXES pango-1.0
22)
23
commit-queue@webkit.org1cd9c172011-09-09 22:06:03 +000024find_path(Pango_Cairo_INCLUDE_DIR
25 NAMES pango/pangocairo.h
26 PATHS ${Pango_Cairo_PKGCONF_INCLUDE_DIRS}
27 PATH_SUFFIXES pango-1.0
28)
29
eric@webkit.orgd99f85b2010-05-15 13:37:59 +000030# Finally the library itself
31find_library(Pango_LIBRARY
32 NAMES pango-1.0
33 PATHS ${Pango_PKGCONF_LIBRARY_DIRS}
34)
35
commit-queue@webkit.org1cd9c172011-09-09 22:06:03 +000036find_library(Pango_Cairo_LIBRARY
37 NAMES pangocairo-1.0
38 PATHS ${Pango_Cairo_PKGCONF_LIBRARY_DIRS}
39)
40
eric@webkit.orgd99f85b2010-05-15 13:37:59 +000041# Set the include dir variables and the libraries and let libfind_process do the rest.
42# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
commit-queue@webkit.org64415dd2011-09-26 21:47:46 +000043set(Pango_PROCESS_INCLUDES Pango_INCLUDE_DIR FREETYPE_INCLUDE_DIRS)
44set(Pango_PROCESS_LIBS Pango_LIBRARY FREETYPE_LIBRARIES)
eric@webkit.orgd99f85b2010-05-15 13:37:59 +000045libfind_process(Pango)
46