Subversion Repositories Scribus

Rev

Rev 13962 | Rev 19911 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
15714 christoph 1
# - Try to find GraphicsMagick
13962 herm 2
# Once done, this will define
3
#
4
#  GMAGICK_FOUND - system has zziplib
5
#  GMAGICK_INCLUDE_DIRS - the zziplib include directories
6
#  GMAGICK_LIBRARIES - link these to use zziplib
7
 
15714 christoph 8
# Note: Detecting GraphicsMagick is hard, as all header files have the same names as the ImageMagick headers. But they are not compatible.
9
 
13962 herm 10
include(FindPkgConfig)
11
 
12
# Use pkg-config to get hints about paths
15714 christoph 13
pkg_check_modules(GMAGICK_PKGCONF GraphicsMagick)
13962 herm 14
 
15
# Include dir
16
find_path(GMAGICK_INCLUDE_DIR
15714 christoph 17
  NAMES GraphicsMagick/magick/api.h
13962 herm 18
  PATHS ${GMAGICK_PKGCONF_INCLUDE_DIRS}
19
)
20
 
21
# Finally the library itself
22
find_library(GMAGICK_LIBRARY
15714 christoph 23
  NAMES GraphicsMagick
13962 herm 24
  PATHS ${GMAGICK_PKGCONF_LIBRARY_DIRS}
25
)
26
 
15714 christoph 27
MESSAGE("GRAPHICS_MAGIC debug: pkgconf: ${GMAGICK_PKGCONF_INCLUDE_DIRS},${GMAGICK_PKGCONF_LIBRARY_DIRS} include:${GMAGICK_INCLUDE_DIR} lib:${GMAGICK_LIBRARY}")
13962 herm 28
INCLUDE(FindPackageHandleStandardArgs)
29
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMAGICK DEFAULT_MSG GMAGICK_LIBRARY GMAGICK_INCLUDE_DIR)
30
IF(GMAGICK_FOUND)
15714 christoph 31
    set(GMAGICK_INCLUDES ${GMAGICK_INCLUDE_DIR}/GraphicsMagick)
13962 herm 32
    set(GMAGICK_LIBRARIES ${GMAGICK_LIBRARY})
33
ELSE()
34
    set(GMAGICK_INCLUDES)
35
    set(GMAGICK_LIBRARIES)
36
ENDIF()