[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / Source / cmake / FindDlog.cmake
1 # - Try to find Dlog
2 # Once done, this will define
3 #
4 #  Dlog_FOUND - system has libdlog-0
5 #  Dlog_INCLUDE_DIRS - the libdlog-0 include directories
6 #  Dlog_LIBRARIES - link these to use libdlog-0
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(Dlog_PKGCONF dlog)
12
13 # Include dir
14 find_path(Dlog_INCLUDE_DIR
15   NAMES dlog.h
16   PATHS ${Dlog_PKGCONF_INCLUDE_DIRS}
17   PATH_SUFFIXES dlog
18 )
19
20 # Finally the library itself
21 find_library(Dlog_LIBRARY
22   NAMES dlog
23   PATHS ${Dlog_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(Dlog_PROCESS_INCLUDES Dlog_INCLUDE_DIR Dlog_INCLUDE_DIRS)
29 set(Dlog_PROCESS_LIBS Dlog_LIBRARY Dlog_LIBRARIES)
30 libfind_process(Dlog)
31