Moar cmake stuff.
[sdlpango.git] / cmake / FindPangomm.cmake
blob4c9c3a40523cc103865f6c0eb84e09864ff8734c
1 # - Try to find Pangomm 1.4
2 # Once done, this will define
4 #  Pangomm_FOUND - system has Pangomm
5 #  Pangomm_INCLUDE_DIRS - the Pangomm include directories
6 #  Pangomm_LIBRARIES - link these to use Pangomm
8 include(LibFindMacros)
10 # Dependencies
11 libfind_package(Pangomm Pango)
12 libfind_package(Pangomm Cairomm)
13 libfind_package(Pangomm Glibmm)
15 # Use pkg-config to get hints about paths
16 libfind_pkg_check_modules(Pangomm_PKGCONF pangomm-1.4)
18 # Main include dir
19 find_path(Pangomm_INCLUDE_DIR
20   NAMES pangomm.h
21   PATHS ${Pangomm_PKGCONF_INCLUDE_DIRS}
22   PATH_SUFFIXES pangomm-1.4
25 libfind_library(Pangomm pangomm 1.4)
27 # Set the include dir variables and the libraries and let libfind_process do the rest.
28 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
29 set(Pangomm_PROCESS_INCLUDES Pangomm_INCLUDE_DIR Pango_INCLUDE_DIRS Cairomm_INCLUDE_DIRS Glibmm_INCLUDE_DIRS)
30 set(Pangomm_PROCESS_LIBS Pangomm_LIBRARY Pango_LIBRARIES Cairomm_LIBRARIES Glibmm_LIBRARIES)
31 libfind_process(Pangomm)