summaryrefslogtreecommitdiffstats
path: root/kpdf/xpdf/ConfigureChecks.cmake
blob: 6c4b56146d60b19f4f4c562a3e4b028988844229 (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
48
49
#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

pkg_search_module( XFT xft )
if( NOT XFT_FOUND )
    tde_message_fatal( "Xft is required, but was not found on your system" )
endif( )


find_package( JPEG )
if( NOT JPEG_FOUND )
  tde_message_fatal( "jpeg is required, but was not found on your system" )
endif( )


# check for t1lib
if( WITH_T1LIB )
  check_include_file( t1lib.h HAVE_T1LIB_H )
  if( HAVE_T1LIB_H )
    check_library_exists( t1 T1_InitLib "" HAVE_T1LIB )
  endif( )
  if( HAVE_T1LIB_H AND HAVE_T1LIB )
    set( T1_LIBRARY t1 CACHE INTERNAL "" FORCE )
  else( )
    tde_message_fatal( "t1lib is required, but was not found on your system" )
  endif( )
endif( )


# check for libpaper
if( WITH_PAPER )
  check_include_file( paper.h HAVE_PAPER_H )
  if( HAVE_PAPER_H )
    check_library_exists( paper paperinit "" HAVE_PAPER )
  endif( )
  if( HAVE_PAPER_H AND HAVE_PAPER )
    set( PAPER_LIBRARY paper CACHE INTERNAL "" FORCE )
  else( )
    tde_message_fatal( "libpaper is required, but was not found on your system" )
  endif( )
endif( )