adapt the FindPoppler to look for poppler-qt4 instead of poppler

svn path=/branches/work/kde4/playground/graphics/cmake/; revision=540406
This commit is contained in:
Pino Toscano 2006-05-13 11:26:01 +00:00
parent 33848a3ee8
commit ccccbc4b99

View file

@ -10,14 +10,14 @@
# in the FIND_PATH() and FIND_LIBRARY() calls # in the FIND_PATH() and FIND_LIBRARY() calls
INCLUDE(UsePkgConfig) INCLUDE(UsePkgConfig)
PKGCONFIG(poppler _PopplerIncDir _PopplerLinkDir _PopplerLinkFlags _PopplerCflags) PKGCONFIG(poppler-qt4 _PopplerIncDir _PopplerLinkDir _PopplerLinkFlags _PopplerCflags)
if(_PopplerLinkFlags) if(_PopplerLinkFlags)
# find again pkg-config, to query it about poppler version # find again pkg-config, to query it about poppler version
FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin ) FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin/ /usr/local/bin )
# query pkg-config asking for a poppler >= 0.5.1 # query pkg-config asking for a poppler-qt4 >= 0.5.1
EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.5.1 poppler RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.5.1 poppler-qt4 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
if(_return_VALUE STREQUAL "0") if(_return_VALUE STREQUAL "0")
set(POPPLER_FOUND TRUE) set(POPPLER_FOUND TRUE)
endif(_return_VALUE STREQUAL "0") endif(_return_VALUE STREQUAL "0")
@ -27,11 +27,11 @@ if (POPPLER_FOUND)
set(POPPLER_INCLUDE_DIR ${_PopplerIncDir}) set(POPPLER_INCLUDE_DIR ${_PopplerIncDir})
set(POPPLER_LIBRARY ${_PopplerLinkFlags}) set(POPPLER_LIBRARY ${_PopplerLinkFlags})
if (NOT POPPLER_FIND_QUIETLY) if (NOT POPPLER_FIND_QUIETLY)
message(STATUS "Found Poppler: ${POPPLER_LIBRARY}") message(STATUS "Found Poppler-qt4: ${POPPLER_LIBRARY}")
endif (NOT POPPLER_FIND_QUIETLY) endif (NOT POPPLER_FIND_QUIETLY)
else (POPPLER_FOUND) else (POPPLER_FOUND)
if (POPPLER_FIND_REQUIRED) if (POPPLER_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find POPPLER") message(FATAL_ERROR "Could NOT find Poppler-qt4")
endif (POPPLER_FIND_REQUIRED) endif (POPPLER_FIND_REQUIRED)
endif (POPPLER_FOUND) endif (POPPLER_FOUND)