From 9d1bdb296ea94fb17bcd84b02c89aa449295628b Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 28 Dec 2010 00:11:34 +0000 Subject: [PATCH] look for poppler 0.16 svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=1209700 --- cmake/modules/FindPoppler.cmake | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/cmake/modules/FindPoppler.cmake b/cmake/modules/FindPoppler.cmake index 5341bda8c..18f7c438b 100644 --- a/cmake/modules/FindPoppler.cmake +++ b/cmake/modules/FindPoppler.cmake @@ -89,17 +89,32 @@ int main() return 0; } " HAVE_POPPLER_0_12_1) +check_cxx_source_compiles(" +#include + +void debugFunction(const QString &message, const QVariant &closure) +{ +} + +int main() +{ + Poppler::setDebugErrorFunction(debugFunction, QVariant()); + return 0; +} +" HAVE_POPPLER_0_16) set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_LIBRARIES) - if (HAVE_POPPLER_0_12_1) + if (HAVE_POPPLER_0_16) + set(popplerVersionMessage "0.16") + elseif (HAVE_POPPLER_0_12_1) set(popplerVersionMessage "0.12.1") elseif (HAVE_POPPLER_0_8) set(popplerVersionMessage "0.8") elseif (HAVE_POPPLER_0_6) set(popplerVersionMessage "0.6") - else (HAVE_POPPLER_0_12_1) + else (HAVE_POPPLER_0_16) set(popplerVersionMessage "0.5.4") - endif (HAVE_POPPLER_0_12_1) + endif (HAVE_POPPLER_0_16) if (NOT Poppler_FIND_QUIETLY) message(STATUS "Found Poppler-Qt4: ${POPPLER_LIBRARY}, (>= ${popplerVersionMessage})") endif (NOT Poppler_FIND_QUIETLY)