Tizen 2.1 base
[platform/core/uifw/ise-engine-sunpinyin.git] / wrapper / ibus / cmake / modules / FindiBus.cmake
1 # - Try to find iBus
2 # Once done, this will define
3 #
4 #  iBus_FOUND - system has iBus
5 #  iBus_INCLUDE_DIRS - the iBus include directories
6 #  iBus_LIBRARIES - link these to use iBus
7
8 include(LibFindMacros)
9
10 # Dependencies
11
12 # Use pkg-config to get hints about paths
13 libfind_pkg_check_modules(iBus_PKGCONF ibus-1.0)
14
15 # Include dir
16 find_path(iBus_INCLUDE_DIR
17   NAMES ibus.h
18   PATHS ${iBus_PKGCONF_INCLUDE_DIRS}
19 )
20
21 # Finally the library itself
22 find_library(iBus_LIBRARY
23   NAMES ibus
24   PATHS ${iBus_PKGCONF_LIBRARY_DIRS}
25 )
26
27 # Set the include dir variables and the libraries and let libfind_process do the
28 # rest.
29 # NOTE: Singular variables for this library, plural for libraries this this lib
30 # depends on.
31 set(iBus_PROCESS_INCLUDES iBus_INCLUDE_DIR)
32 set(iBus_PROCESS_LIBS iBus_LIBRARY)
33 libfind_process(iBus)
34