1 # - Try to find gdk-pixbuf 2.0 2 # Once done, this will define 3 # 4 # GDK-PixBuf_FOUND - system has GDK-PixBuf 5 # GDK-PixBuf_INCLUDE_DIRS - the GDK-PixBuf include directories 6 # GDK-PixBuf_LIBRARIES - link these to use GDK-PixBuf 7 8 include(LibFindMacros) 9 10 # Use pkg-config to get hints about paths 11 libfind_pkg_check_modules(GDK-PixBuf_PKGCONF gdk-pixbuf-2.0) 12 13 # Main include dir 14 find_path(GDK-PixBuf_INCLUDE_DIR 15 NAMES gdk-pixbuf/gdk-pixbuf.h 16 PATHS ${GDK-PixBuf_PKGCONF_INCLUDE_DIRS} 17 PATH_SUFFIXES gtk-2.0 18 ) 19 20 # Finally the library itself 21 find_library(GDK-PixBuf_LIBRARY 22 NAMES gdk_pixbuf-2.0 23 PATHS ${GDK-PixBuf_PKGCONF_LIBRARY_DIRS} 24 ) 25 26 # Set the include dir variables and the libraries and let libfind_process do the rest. 27 # NOTE: Singular variables for this library, plural for libraries this this lib depends on. 28 set(GDK-PixBuf_PROCESS_INCLUDES GDK-PixBuf_INCLUDE_DIR) 29 set(GDK-PixBuf_PROCESS_LIBS GDK-PixBuf_LIBRARY) 30 libfind_process(GDK-PixBuf) 31 32 33