swh:1:snp:c7c108084bc0bf3d81436bf980b46e98bd338453
Tip revision: 1b9ceb77d9b7b4bcbd7c5aee1c9cc3ffb353252e authored by Roman Lebedev on 31 January 2017, 09:37:10 UTC
RELEASE NOTES: preparing for .3 :)
RELEASE NOTES: preparing for .3 :)
Tip revision: 1b9ceb7
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
HINTS ${JsonGlib_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES json-glib-1.0
)
# Finally the library itself
find_library(JsonGlib_LIBRARY
NAMES json-glib-1.0
HINTS ${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)