swh:1:snp:c7c108084bc0bf3d81436bf980b46e98bd338453
Tip revision: 961197c1349a911ac888f9e0cc32d92c0baef7b5 authored by johannes hanika on 24 June 2013, 18:35:28 UTC
translations: throw away incomplete stuff for release.
translations: throw away incomplete stuff for release.
Tip revision: 961197c
FindJsonGlib.cmake
# - Try to find JsonGlib-1.0
# Once done, this will define
#
# JsonGlib_FOUND - system has Glib
# JsonGlib_INCLUDE_DIRS - the Glib include directories
# JsonGlib_LIBRARIES - link these to use Glib
include(LibFindMacros)
# Use pkg-config to get hints about paths
libfind_pkg_check_modules(JsonGlib_PKGCONF json-glib-1.0)
# Main include dir
find_path(JsonGlib_INCLUDE_DIR
NAMES json-glib/json-glib.h
PATHS ${JsonGlib_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES json-glib-1.0
)
# Finally the library itself
find_library(JsonGlib_LIBRARY
NAMES json-glib-1.0
PATHS ${JsonGlib_PKGCONF_LIBRARY_DIRS}
)
# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
set(JsonGlib_PROCESS_INCLUDES ${JsonGlib_INCLUDE_DIR})
set(JsonGlib_PROCESS_LIBS ${JsonGlib_LIBRARY})
libfind_process(JsonGlib)
if(JsonGlib_FOUND)
set(JsonGlib_INCLUDE_DIRS ${JsonGlib_INCLUDE_DIR})
set(JsonGlib_LIBRARIES ${JsonGlib_LIBRARY})
endif(JsonGlib_FOUND)