[Release] Webkit2-efl-123997_0.11.46
[framework/web/webkit-efl.git] / Source / cmake / Findfeedback.cmake
1 # - Try to find feedback
2 # Once done, this will define
3 #
4 #  feedback_FOUND - system has feedback
5 #  feedback_INCLUDE_DIRS - the feedback include directories
6 #  feedback_LIBRARIES - link these to use feedback
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(feedback_PKGCONF feedback)
12
13 # Include dir
14 find_path(feedback_INCLUDE_DIR
15   NAMES feedback.h
16   PATHS ${feedback_PKGCONF_INCLUDE_DIRS}
17   PATH_SUFFIXES feedback
18 )
19
20 # Finally the library itself
21 find_library(feedback_LIBRARY
22   NAMES feedback
23   PATHS ${feedback_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(feedback_PROCESS_INCLUDES feedback_INCLUDE_DIR feddback_INCLUDE_DIRS)
29 set(feedback_PROCESS_LIBS feedback_LIBRARY feedback_LIBRARIES)
30 libfind_process(libfeedback)