File: FindGObject.cmake

package info (click to toggle)
darktable 1.4.2-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 19,940 kB
  • ctags: 22,185
  • sloc: ansic: 181,925; cpp: 32,612; lisp: 4,681; xml: 4,046; sh: 2,002; makefile: 395; python: 315; perl: 114; awk: 110; asm: 46
file content (31 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# - Try to find GObject 2.0
# Once done, this will define
#
#  GObject_FOUND - system has GObject
#  GObject_INCLUDE_DIRS - the GObject include directories
#  GObject_LIBRARIES - link these to use GObject

include(LibFindMacros)

# Dependencies
libfind_package(GObject Glib)

# Use pkg-config to get hints about paths
libfind_pkg_check_modules(GObject_PKGCONF gobject-2.0)

# Find the library
find_library(GObject_LIBRARY
  NAMES gobject-2.0
  HINTS ${GObject_PKGCONF_LIBRARY_DIRS}
)

find_path(GObject_INCLUDE_DIR
  NAMES gobject/gobject.h
  HINTS ${GObject_PKGCONF_INCLUDE_DIRS}
  PATHS ${Glib_INCLUDE_DIRS}
)

set(GObject_PROCESS_INCLUDES GObject_INCLUDE_DIR Glib_INCLUDE_DIRS)
set(GObject_PROCESS_LIBS GObject_LIBRARY Glib_LIBRARIES)
libfind_process(GObject)