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

« back to all changes in this revision

Viewing changes to cmake/modules/FindCairo.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 Cairo
 
2
# Once done, this will define
 
3
#
 
4
#  Cairo_FOUND - system has Cairo
 
5
#  Cairo_INCLUDE_DIRS - the Cairo include directories
 
6
#  Cairo_LIBRARIES - link these to use Cairo
 
7
 
 
8
include(LibFindMacros)
 
9
 
 
10
# Dependencies
 
11
libfind_package(Cairo Freetype)
 
12
 
 
13
# Use pkg-config to get hints about paths
 
14
libfind_pkg_check_modules(Cairo_PKGCONF cairo)
 
15
 
 
16
# Include dir
 
17
find_path(Cairo_INCLUDE_DIR
 
18
  NAMES cairo.h
 
19
  PATHS ${Cairo_PKGCONF_INCLUDE_DIRS}
 
20
  PATH_SUFFIXES cairo
 
21
)
 
22
 
 
23
# Finally the library itself
 
24
find_library(Cairo_LIBRARY
 
25
  NAMES cairo
 
26
  PATHS ${Cairo_PKGCONF_LIBRARY_DIRS}
 
27
)
 
28
 
 
29
# Set the include dir variables and the libraries and let libfind_process do the rest.
 
30
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
 
31
set(Cairo_PROCESS_INCLUDES Cairo_INCLUDE_DIR Freetype_INCLUDE_DIRS)
 
32
set(Cairo_PROCESS_LIBS Cairo_LIBRARY Freetype_LIBRARIES)
 
33
libfind_process(Cairo)
 
34