File: FindGIO.cmake

package info (click to toggle)
performous 0.7.0%2Bgit20140715-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,900 kB
  • ctags: 3,470
  • sloc: cpp: 16,647; sh: 2,495; ansic: 2,015; python: 431; xml: 407; objc: 245; makefile: 12
file content (27 lines) | stat: -rw-r--r-- 727 bytes parent folder | download | duplicates (12)
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
# - Try to find GIO 2.0
# Once done, this will define
#
#  GIO_FOUND - system has GIO
#  GIO_INCLUDE_DIRS - the GIO include directories
#  GIO_LIBRARIES - link these to use GIO

include(LibFindMacros)

# Dependencies
libfind_package(GIO Glib)

# Use pkg-config to get hints about paths
libfind_pkg_check_modules(GIO_PKGCONF gio-2.0)

# Find the library
find_library(GIO_LIBRARY
  NAMES gio-2.0
  PATHS ${GIO_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(GIO_PROCESS_INCLUDES Glib_INCLUDE_DIRS)
set(GIO_PROCESS_LIBS GIO_LIBRARY Glib_LIBRARIES)
libfind_process(GIO)