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}
22 # Finally the library itself
23 find_library(Cairo_LIBRARY
25 PATHS ${Cairo_PKGCONF_LIBRARY_DIRS}
28 # Set the include dir variables and the libraries and let libfind_process do the rest.
29 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
30 set(Cairo_PROCESS_INCLUDES Cairo_INCLUDE_DIR Freetype_INCLUDE_DIRS)
31 set(Cairo_PROCESS_LIBS Cairo_LIBRARY Freetype_LIBRARIES)
32 libfind_process(Cairo)