Moar cmake stuff.
[sdlpango.git] / cmake / FindAtk.cmake
blobf9071f329b23d4cae9a197db6e3fb51731fcaeec
1 # - Try to find Atk 1.0
2 # Once done, this will define
4 #  Atk_FOUND - system has Atk
5 #  Atk_INCLUDE_DIRS - the Atk include directories
6 #  Atk_LIBRARIES - link these to use Atk
8 include(LibFindMacros)
10 # Dependencies
11 libfind_package(Atk GObject)
13 # Use pkg-config to get hints about paths
14 libfind_pkg_check_modules(Atk_PKGCONF atk)
16 # Main include dir
17 find_path(Atk_INCLUDE_DIR
18   NAMES atk/atk.h
19   PATHS ${Atk_PKGCONF_INCLUDE_DIRS}
20   PATH_SUFFIXES atk-1.0
23 # Find the library
24 find_library(Atk_LIBRARY
25   NAMES atk-1.0
26   PATHS ${Atk_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(Atk_PROCESS_INCLUDES Atk_INCLUDE_DIR)
32 set(Atk_PROCESS_LIBS Atk_LIBRARY GObject_LIBRARIES)
33 libfind_process(Atk)