summaryrefslogtreecommitdiffstats
path: root/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake')
-rw-r--r--tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake40
1 files changed, 10 insertions, 30 deletions
diff --git a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
index 9f55e6be..99a48c8e 100644
--- a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
+++ b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
@@ -6,34 +6,14 @@ else( )
tde_message_fatal( "poppler is required, but was not found on your system" )
endif( )
-tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
-set( CMAKE_REQUIRED_INCLUDES ${DBUS_TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${POPPLER_INCLUDE_DIRS})
-set( CMAKE_REQUIRED_LIBRARIES ${DBUS_TQT_LDFLAGS} ${TQT_LDFLAGS} ${QT_LDFLAGS} ${POPPLER_LDFLAGS} )
-check_cxx_source_compiles("
- #include <PSOutputDev.h>
- int main(int, char**) { int a; int b; PSOutputDev *psOut = new PSOutputDev(\"test\", (PDFDoc*)0, (XRef*)0, (Catalog*)0, NULL, 0, 0, psModePS, a, b); } "
- HAVE_POPPLER_016 )
-check_cxx_source_compiles("
- #include <PSOutputDev.h>
- int main(int, char**) { int a; int b; PSOutputDev *psOut = new PSOutputDev(\"test\", (PDFDoc*)0, NULL, 0, 0, psModePS, a, b); } "
- HAVE_POPPLER_020 )
-check_cxx_source_compiles("
- #include <vector>
- #include <PSOutputDev.h>
- int main(int, char**) { int a; int b; std::vector<int> p; PSOutputDev *psOut = new PSOutputDev(\"test\", (PDFDoc*)0, NULL, p, psModePS, a, b); } "
- HAVE_POPPLER_030 )
-tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
+string( REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)"
+ POPPLER_VERSION_SPLIT ${POPPLER_VERSION} )
+set( POPPLER_VERSION_MAJOR ${CMAKE_MATCH_1} )
+set( POPPLER_VERSION_MINOR ${CMAKE_MATCH_2} )
+set( POPPLER_VERSION_PATCH ${CMAKE_MATCH_3} )
+math( EXPR POPPLER_VERSION_C "(${POPPLER_VERSION_MAJOR}*1000000) + (${POPPLER_VERSION_MINOR}*1000) + ${POPPLER_VERSION_PATCH}" )
+set( POPPLER_VERSION_C ${POPPLER_VERSION_C} CACHE INTERNAL "Poppler library version as code number" )
-foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 )
- string( REPLACE "." "" _poppler_str "${_poppler_ver}" )
- if( NOT DEFINED HAVE_POPPLER_${_poppler_str} )
- message( STATUS "Performing Test HAVE_POPPLER_${_poppler_str}" )
- if( NOT POPPLER_VERSION VERSION_LESS "${_poppler_ver}" )
- set( HAVE_POPPLER_${_poppler_str} 1 CACHE INTERNAL "" FORCE )
- message( STATUS "Performing Test HAVE_POPPLER_${_poppler_str} - Success" )
- else( )
- set( HAVE_POPPLER_${_poppler_str} "" CACHE INTERNAL "" FORCE )
- message( STATUS "Performing Test HAVE_POPPLER_${_poppler_str} - Failed" )
- endif( )
- endif( )
-endforeach( )
+if( NOT POPPLER_VERSION_C LESS 21012000 )
+ set( POPPLER_CXX_FEATURES cxx_std_17 CACHE INTERNAL "C++ standard required by Poppler" )
+endif()