2
# Once done, this will define
4
# Cairo_FOUND - system has Cairo
5
# Cairo_INCLUDE_DIRS - the Cairo include directories
6
# Cairo_LIBRARIES - link these to use Cairo
11
libfind_package(Cairo Freetype)
13
# Use pkg-config to get hints about paths
14
libfind_pkg_check_modules(Cairo_PKGCONF cairo)
17
find_path(Cairo_INCLUDE_DIR
19
PATHS ${Cairo_PKGCONF_INCLUDE_DIRS}
23
# Finally the library itself
24
find_library(Cairo_LIBRARY
26
PATHS ${Cairo_PKGCONF_LIBRARY_DIRS}
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)