~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to cmake/modules/FindPango.cmake

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-04-14 23:42:12 UTC
  • Revision ID: james.westby@ubuntu.com-20110414234212-kuffcz5wiu18v6ra
Tags: upstream-0.8
ImportĀ upstreamĀ versionĀ 0.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
libfind_package(Pango Glib)
 
13
libfind_package(Pango GObject)
 
14
 
 
15
# Use pkg-config to get hints about paths
 
16
libfind_pkg_check_modules(Pango_PKGCONF pango)
 
17
 
 
18
# Include dir
 
19
find_path(Pango_INCLUDE_DIR
 
20
  NAMES pango/pango.h
 
21
  PATHS ${Pango_PKGCONF_INCLUDE_DIRS}
 
22
  PATH_SUFFIXES pango-1.0
 
23
)
 
24
 
 
25
# Finally the library itself
 
26
find_library(Pango_LIBRARY
 
27
  NAMES pango-1.0
 
28
  PATHS ${Pango_PKGCONF_LIBRARY_DIRS}
 
29
)
 
30
 
 
31
# Set the include dir variables and the libraries and let libfind_process do the rest.
 
32
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
 
33
set(Pango_PROCESS_INCLUDES Pango_INCLUDE_DIR Freetype_INCLUDE_DIRS Glib_INCLUDE_DIRS)
 
34
set(Pango_PROCESS_LIBS Pango_LIBRARY Freetype_LIBRARIES Glib_LIBRARIES GObject_LIBRARIES)
 
35
libfind_process(Pango)
 
36