Subversion Repositories Scribus

Rev

Rev 5157 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5138 cbradney 1
#
2
# Find the native LIBART includes and library
3
#
4
 
5
# This module defines
6
# LIBART_LGPL_INCLUDE_DIR, where to find art*.h etc
7
# LIBART_LGPL_LIBRARY, the libraries to link against to use LIBART.
8
# LIBART_LGPL_FOUND, If false, do not try to use LIBART.
9
# LIBART_LGPL_LIBS, link information
10
# LIBART_LGPL_CFLAGS, cflags for include information
11
 
12
 
13
INCLUDE(UsePkgConfig)
14
 
15
# use pkg-config to get the directories and then use these values
16
# in the FIND_PATH() and FIND_LIBRARY() calls
17
PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags)
18
 
19
SET(LIBART_LGPL_LIBS ${_libArtCflags})
20
 
21
FIND_PATH(LIBART_LGPL_INCLUDE_DIR libart_lgpl/libart.h
22
${_libArtIncDir}
23
/usr/include
24
/usr/local/include/
25
PATH_SUFFIXES
26
libart-2.0
27
)
28
 
29
FIND_LIBRARY(LIBART_LGPL_LIBRARY NAMES art_lgpl_2
30
PATHS
31
${_libArtLinkDir}
32
/usr/lib
33
/usr/local/lib
34
)
35
 
36
SET(LIBART_LGPL_FIND_QUIETLY 1)
37
 
38
IF (LIBART_LGPL_LIBRARY)
39
  IF (LIBART_LGPL_INCLUDE_DIR)
40
    SET( LIBART_LGPL_FOUND "YES" )
41
    IF(NOT LIBART_LGPL_FIND_QUIETLY)
42
      MESSAGE(STATUS "Found Libart_LGPL: ${LIBART_LGPL_LIBRARY}")
43
    ENDIF(NOT LIBART_LGPL_FIND_QUIETLY)
44
    SET( LIBART_LGPL_LIBRARIES ${LIBART_LGPL_LIBRARY} )
45
    FIND_PROGRAM(LIBART_LGPL_CONFIG NAMES libart2-config PATHS ${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin /usr/nekoware/bin /usr/X11/bin)
46
    EXEC_PROGRAM(${LIBART_LGPL_CONFIG} ARGS --libs OUTPUT_VARIABLE LIBART_LGPL_LIBS)
47
    EXEC_PROGRAM(${LIBART_LGPL_CONFIG} ARGS --cflags OUTPUT_VARIABLE LIBART_LGPL_CFLAGS)
48
  ENDIF (LIBART_LGPL_INCLUDE_DIR)
5171 cbradney 49
ENDIF (LIBART_LGPL_LIBRARY)