tizen beta release
[profile/ivi/webkit-efl.git] / Source / cmake / FindTizen-Location.cmake
1 # - Try to find Tizen-Location
2 # Once done, this will define
3 #
4 #  Tizen-Location_FOUND - system has location
5 #  Tizen-Location_INCLUDE_DIRS - the location include directories
6 #  Tizen-Location_LIBRARIES - link these to use location
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(Tizen-Location_PKGCONF location)
12
13 # Include dir
14 find_path(Tizen-Location_INCLUDE_DIR
15   NAMES location.h
16   PATHS ${Tizen-Location_PKGCONF_INCLUDE_DIRS}
17   PATH_SUFFIXES location
18 )
19
20 # Finally the library itself
21 find_library(Tizen-Location_LIBRARY
22   NAMES SLP-location
23   PATHS ${Tizen-Location_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(Tizen-Location_PROCESS_INCLUDES Tizen-Location_INCLUDE_DIR Tizen-Location_INCLUDE_DIRS)
29 set(Tizen-Location_PROCESS_LIBS Tizen-Location_LIBRARY Tizen-Location_LIBRARIES)
30 libfind_process(Tizen-Location)