summaryrefslogtreecommitdiffstats
path: root/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
blob: 2d2e51366ebf0240ab2a2d484b46414f8e8b64f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Poppler
pkg_search_module( POPPLER poppler )
if( POPPLER_FOUND )
  set( HAVE_POPPLER 1 )
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} ${QT_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 )

if( NOT DEFINED HAVE_POPPLER_058 )
  message( STATUS "Performing Test HAVE_POPPLER_058" )
  if( NOT POPPLER_VERSION VERSION_LESS "0.58" )
    set( HAVE_POPPLER_058 1 CACHE INTERNAL "" FORCE )
    message( STATUS "Performing Test HAVE_POPPLER_058 - Success" )
  else( )
    set( HAVE_POPPLER_058 "" CACHE INTERNAL "" FORCE )
    message( STATUS "Performing Test HAVE_POPPLER_058 - Failed" )
  endif( )
endif( )

if( NOT DEFINED HAVE_POPPLER_064 )
  message( STATUS "Performing Test HAVE_POPPLER_064" )
  if( NOT POPPLER_VERSION VERSION_LESS "0.64" )
    set( HAVE_POPPLER_064 1 CACHE INTERNAL "" FORCE )
    message( STATUS "Performing Test HAVE_POPPLER_064 - Success" )
  else( )
    set( HAVE_POPPLER_064 "" CACHE INTERNAL "" FORCE )
    message( STATUS "Performing Test HAVE_POPPLER_064 - Failed" )
  endif( )
endif( )