eric@webkit.org | d99f85b | 2010-05-15 13:37:59 +0000 | [diff] [blame] | 1 | # - 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 | |
| 8 | include(LibFindMacros) |
| 9 | |
| 10 | # Dependencies |
| 11 | libfind_package(Pango Freetype) |
| 12 | |
| 13 | # Use pkg-config to get hints about paths |
| 14 | libfind_pkg_check_modules(Pango_PKGCONF pango) |
commit-queue@webkit.org | 1cd9c17 | 2011-09-09 22:06:03 +0000 | [diff] [blame] | 15 | libfind_pkg_check_modules(Pango_Cairo_PKGCONF pango) |
eric@webkit.org | d99f85b | 2010-05-15 13:37:59 +0000 | [diff] [blame] | 16 | |
| 17 | # Include dir |
| 18 | find_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.org | 1cd9c17 | 2011-09-09 22:06:03 +0000 | [diff] [blame] | 24 | find_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.org | d99f85b | 2010-05-15 13:37:59 +0000 | [diff] [blame] | 30 | # Finally the library itself |
| 31 | find_library(Pango_LIBRARY |
| 32 | NAMES pango-1.0 |
| 33 | PATHS ${Pango_PKGCONF_LIBRARY_DIRS} |
| 34 | ) |
| 35 | |
commit-queue@webkit.org | 1cd9c17 | 2011-09-09 22:06:03 +0000 | [diff] [blame] | 36 | find_library(Pango_Cairo_LIBRARY |
| 37 | NAMES pangocairo-1.0 |
| 38 | PATHS ${Pango_Cairo_PKGCONF_LIBRARY_DIRS} |
| 39 | ) |
| 40 | |
eric@webkit.org | d99f85b | 2010-05-15 13:37:59 +0000 | [diff] [blame] | 41 | # 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.org | 64415dd | 2011-09-26 21:47:46 +0000 | [diff] [blame] | 43 | set(Pango_PROCESS_INCLUDES Pango_INCLUDE_DIR FREETYPE_INCLUDE_DIRS) |
| 44 | set(Pango_PROCESS_LIBS Pango_LIBRARY FREETYPE_LIBRARIES) |
eric@webkit.org | d99f85b | 2010-05-15 13:37:59 +0000 | [diff] [blame] | 45 | libfind_process(Pango) |
| 46 | |