blob: 53bb05014ab48bacfd4b54e7013e9f092d68d4af (
plain)
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
45
46
47
|
# - Try to find the gdk-pixbuf-2.0 library
# Once done this will define
#
# GDK_PIXBUF_FOUND - system has gdk-pixbuf-2.0
# GDK_PIXBUF_INCLUDE_DIRS - the gdk-pixbuf-2.0 include directory
# GDK_PIXBUF_LIBRARIES - Link these to use gdk-pixbuf-2.0
#
# Define GDK_PIXBUF_MIN_VERSION for which version desired.
#
INCLUDE(FindPkgConfig)
IF(GdkPixbuf_FIND_REQUIRED)
SET(_pkgconfig_REQUIRED "REQUIRED")
ELSE(GdkPixbuf_FIND_REQUIRED)
SET(_pkgconfig_REQUIRED "")
ENDIF(GdkPixbuf_FIND_REQUIRED)
IF(GDK_PIXBUF_MIN_VERSION)
PKG_SEARCH_MODULE(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0>=${GDK_PIXBUF_MIN_VERSION}")
ELSE(GDK_PIXBUF_MIN_VERSION)
PKG_SEARCH_MODULE(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0")
ENDIF(GDK_PIXBUF_MIN_VERSION)
IF(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND)
FIND_PATH(GDK_PIXBUF_INCLUDE_DIRS gdk-pixbuf/gdk-pixbuf.h)
FIND_LIBRARY(GDK_PIXBUF_LIBRARIES gdk_pixbuf-2.0)
# Report results
IF(GDK_PIXBUF_LIBRARIES AND GDK_PIXBUF_INCLUDE_DIRS)
SET(GDK_PIXBUF_FOUND 1)
IF(NOT GdkPixbuf_FIND_QUIETLY)
MESSAGE(STATUS "Found GdkPixbuf: ${GDK_PIXBUF_LIBRARIES}")
ENDIF(NOT GdkPixbuf_FIND_QUIETLY)
ELSE(GDK_PIXBUF_LIBRARIES AND GDK_PIXBUF_INCLUDE_DIRS)
IF(GdkPixbuf_FIND_REQUIRED)
MESSAGE(SEND_ERROR "Could not find GdkPixbuf")
ELSE(GdkPixbuf_FIND_REQUIRED)
IF(NOT GdkPixbuf_FIND_QUIETLY)
MESSAGE(STATUS "Could not find GdkPixbuf")
ENDIF(NOT GdkPixbuf_FIND_QUIETLY)
ENDIF(GdkPixbuf_FIND_REQUIRED)
ENDIF(GDK_PIXBUF_LIBRARIES AND GDK_PIXBUF_INCLUDE_DIRS)
ENDIF(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND)
# Hide advanced variables from CMake GUIs
MARK_AS_ADVANCED(GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS)
|