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)