File: FindGDKmm.cmake

package info (click to toggle)
performous 1.1%2Bgit20181118-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,712 kB
  • sloc: cpp: 30,008; ansic: 2,751; sh: 801; xml: 464; python: 374; makefile: 22
file content (44 lines) | stat: -rw-r--r-- 1,367 bytes parent folder | download | duplicates (4)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
# - Try to find GDKmm 2.4
# Once done, this will define
#
#  GDKmm_FOUND - system has GDKmm
#  GDKmm_INCLUDE_DIRS - the GDKmm include directories
#  GDKmm_LIBRARIES - link these to use GDKmm

include(LibFindMacros)

# Dependencies
libfind_package(GDKmm GDK)
libfind_package(GDKmm Glibmm)
libfind_package(GDKmm Pangomm)
libfind_package(GDKmm Cairomm)

# Use pkg-config to get hints about paths
libfind_pkg_check_modules(GDKmm_PKGCONF gdkmm-2.4)

# Main include dir
find_path(GDKmm_INCLUDE_DIR
  NAMES gdkmm.h
  HINTS ${GDKmm_PKGCONF_INCLUDE_DIRS}
  PATH_SUFFIXES gdkmm-2.4
)

# Glib-related libraries also use a separate config header, which is in lib dir
find_path(GDKmmConfig_INCLUDE_DIR
  NAMES gdkmmconfig.h
  HINTS ${GDKmm_PKGCONF_INCLUDE_DIRS} /usr
  PATH_SUFFIXES lib/gdkmm-2.4/include
)

# Finally the library itself
find_library(GDKmm_LIBRARY
  NAMES gdkmm-2.4
  HINTS ${GDKmm_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(GDKmm_PROCESS_INCLUDES GDKmm_INCLUDE_DIR GDKmmConfig_INCLUDE_DIR GDK_INCLUDE_DIRS Glibmm_INCLUDE_DIRS Pangomm_INCLUDE_DIRS Cairomm_INCLUDE_DIRS)
set(GDKmm_PROCESS_LIBS GDKmm_LIBRARY GDK_LIBRARIES Glibmm_LIBRARIES Pangomm_LIBRARIES Cairomm_LIBRARIES)
libfind_process(GDKmm)