Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
16730 fschmid 1
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
2
	INCLUDE(UsePkgConfig)
3
	PKGCONFIG(poppler _libPopplerIncDir _libPopplerLinkDir _libPopplerLinkFlags _libPopplerCflags)
4
    SET(PKG_POPPLER_INCLUDE_DIRS ${_libPopplerIncDir})
5
    SET(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir})
6
 ELSE (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
7
    INCLUDE(FindPkgConfig)
17894 craig 8
	pkg_search_module(POPPLER libpoppler>=0.19.0 poppler>=0.19.0)
16730 fschmid 9
 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
10
FIND_PATH(POPPLER_INCLUDE_DIR
11
  NAMES poppler-config.h
12
  PATHS ${PKG_POPPLER_INCLUDE_DIRS} ${POPPLER_INCLUDE_DIRS} /usr/local/include /usr/include
13
  PATH_SUFFIXES poppler
14
  NO_DEFAULT_PATH
15
)
16
 
17
FIND_LIBRARY(POPPLER_LIBRARY
18
  NAMES libpoppler poppler
17647 jghali 19
  PATHS ${PKG_POPPLER_LIBRARIES} ${POPPLER_LIBRARY_DIRS} /usr/local/lib /usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
17609 craig 20
  PATH_SUFFIXES poppler
16730 fschmid 21
  NO_DEFAULT_PATH
22
)
23
IF (POPPLER_LIBRARY)
24
  IF (POPPLER_INCLUDE_DIR)
25
	SET( FOUND_POPPLER 1 )
26
    SET( POPPLER_LIBRARIES ${POPPLER_LIBRARY} )
27
    SET( POPPLER_INCLUDES ${POPPLER_INCLUDE_DIR})
28
  ENDIF (POPPLER_INCLUDE_DIR)
17601 craig 29
ENDIF (POPPLER_LIBRARY)