[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.24
[framework/web/webkit-efl.git] / Source / cmake / FindEDBUS.cmake
1 # - Try to find E-DBus
2 # Once done, this will define
3 #
4 #  EDBUS_FOUND - system has edbus
5 #  EDBUS_INCLUDE_DIRS - the edbus include directories
6 #  EDBUS_LIBRARIES - link these to use edbus
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(EDBUS_PKGCONF edbus)
12
13 # Include dir
14 find_path(EDBUS_INCLUDE_DIR
15   NAMES E_DBus.h
16   PATHS ${EDBUS_PKGCONF_INCLUDE_DIRS}
17 )
18
19 # Finally the library itself
20 find_library(EDBUS_LIBRARY
21   NAMES edbus
22   PATHS ${EDBUS_PKGCONF_LIBRARY_DIRS}
23 )
24
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(EDBUS_PROCESS_INCLUDES EDBUS_INCLUDE_DIR EDBUS_INCLUDE_DIRS)
28 set(EDBUS_PROCESS_LIBS EDBUS_LIBRARY EDBUS_LIBRARIES)
29 libfind_process(EDBUS)
30