Debian Codegraph @

cmake/FindGObject.cmake

raw
1 # - Try to find GObject
2 # Once done, this will define
3 #
4 # GObject_FOUND - system has GObject
5 # GObject_INCLUDE_DIRS - the GObject include directories
6 # GObject_LIBRARIES - link these to use GObject
7
8 include(LibFindMacros)
9
10 # Dependencies
11 # The current package name (GObject) is included as first paramater in order to foward the REQUIRED or QUIET paramaters
12 # to the find_package for the dependent library (ie Threads)
13 #libfind_package(GObject)
14
15 # Use pkg-config to get hints about paths
16 libfind_pkg_check_modules(GObject_PKGCONF gobject-2.0)
17
18 # Include dir
19 find_path(GObject_INCLUDE_DIR
20 NAMES gobject/gobject.h
21 HINTS ${GObject_PKGCONF_INCLUDE_DIRS}
22 )
23
24 # Finally the library itself
25 find_library(GObject_LIBRARY
26 NAMES gobject-2.0
27 HINTS ${GObject_PKGCONF_LIBRARY_DIRS}
28 )
29
30 # Set the include dir variables and the libraries and let libfind_process do the rest.
31 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
32 set(GObject_PROCESS_INCLUDES GObject_INCLUDE_DIR )
33 set(GObject_PROCESS_LIBS GObject_LIBRARY)
34 libfind_process(GObject)