Moar cmake stuff.
[sdlpango.git] / cmake / FindCairomm.cmake
blob2cff90be9a3aeabf14c7cdf6481dc576420d726c
1 # - Try to find Cairomm 1.0
2 # Once done, this will define
4 #  Cairomm_FOUND - system has Cairomm
5 #  Cairomm_INCLUDE_DIRS - the Cairomm include directories
6 #  Cairomm_LIBRARIES - link these to use Cairomm
8 include(LibFindMacros)
10 # Dependencies
11 libfind_package(Cairomm Cairo)
13 # Use pkg-config to get hints about paths
14 libfind_pkg_check_modules(Cairomm_PKGCONF cairomm-1.0)
16 # Main include dir
17 find_path(Cairomm_INCLUDE_DIR
18   NAMES cairomm/cairomm.h
19   PATHS ${Cairomm_PKGCONF_INCLUDE_DIRS}
20   PATH_SUFFIXES cairomm-1.0
23 libfind_library(Cairomm cairomm 1.0)
25 # Set the include dir variables and the libraries and let libfind_process do the rest.
26 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
27 set(Cairomm_PROCESS_INCLUDES Cairomm_INCLUDE_DIR Cairo_INCLUDE_DIRS)
28 set(Cairomm_PROCESS_LIBS Cairomm_LIBRARY Cairo_LIBRARIES)
29 libfind_process(Cairomm)