[Release] Webkit2-efl-123997_0.11.46
[framework/web/webkit-efl.git] / Source / cmake / FindAUL.cmake
1 # - Try to find AUL
2 # Once done, this will define
3 #
4 #  AUL_FOUND - system has libaul-1
5 #  AUL_INCLUDE_DIRS - the libaul-1 include directories
6 #  AUL_LIBRARIES - link these to use libaul-1
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(AUL_PKGCONF aul)
12
13 # Include dir
14 find_path(AUL_INCLUDE_DIR
15   NAMES aul.h
16   PATHS ${AUL_PKGCONF_INCLUDE_DIRS}
17   PATH_SUFFIXES aul
18 )
19
20 # Finally the library itself
21 find_library(AUL_LIBRARY
22   NAMES aul
23   PATHS ${AUL_PKGCONF_LIBRARY_DIRS}
24 )
25
26 # Set the include dir variables and the libraries and let libfind_process do the rest.
27 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
28 set(AUL_PROCESS_INCLUDES AUL_INCLUDE_DIR AUL_INCLUDE_DIRS)
29 set(AUL_PROCESS_LIBS AUL_LIBRARY AUL_LIBRARIES)
30 libfind_process(AUL)
31