[Release] Webkit2-efl-123997_0.11.46
[framework/web/webkit-efl.git] / Source / cmake / FindETHUMB.cmake
1 # - Try to find ETHUMB
2 # Once done, this will define
3 #
4 #  ETHUMB_FOUND - system has libethumb
5 #  ETHUMB_INCLUDE_DIRS - the libethumb include directories
6 #  ETHUMB_LIBRARIES - link these to use libethumb
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(ETHUMB_PKGCONF ethumb)
12
13 # Include dir
14 find_path(ETHUMB_INCLUDE_DIR
15   NAMES Ethumb.h
16   PATHS ${ETHUMB_PKGCONF_INCLUDE_DIRS}
17 )
18
19 # Finally the library itself
20 find_library(ETHUMB_LIBRARY
21   NAMES ethumb
22   PATHS ${ETHUMB_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(ETHUMB_PROCESS_INCLUDES ETHUMB_INCLUDE_DIR ETHUMB_INCLUDE_DIRS)
28 set(ETHUMB_PROCESS_LIBS ETHUMB_LIBRARY ETHUMB_LIBRARIES)
29 libfind_process(ETHUMB)
30