~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/poppler/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
project(poppler)
 
2
 
 
3
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
 
4
 
 
5
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
 
6
 
 
7
include(PopplerDefaults)
 
8
include(PopplerMacros)
 
9
include(MacroOptionalFindPackage)
 
10
find_package(PkgConfig)
 
11
include(MacroEnsureVersion)
 
12
include(MacroBoolTo01)
 
13
find_package(Threads)
 
14
include(TestBigEndian)
 
15
test_big_endian(WORDS_BIGENDIAN)
 
16
 
 
17
set(POPPLER_MAJOR_VERSION "0")
 
18
set(POPPLER_MINOR_VERSION "16")
 
19
set(POPPLER_MICRO_VERSION "3")
 
20
set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
 
21
 
 
22
# command line switches
 
23
option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF)
 
24
option(BUILD_GTK_TESTS "Whether compile the GTK+ test programs." ON)
 
25
option(BUILD_QT3_TESTS "Whether compile the Qt3 test programs." ON)
 
26
option(BUILD_QT4_TESTS "Whether compile the Qt4 test programs." ON)
 
27
option(BUILD_CPP_TESTS "Whether compile the CPP test programs." ON)
 
28
option(ENABLE_SPLASH "Build the Splash graphics backend." ON)
 
29
option(ENABLE_UTILS "Compile poppler command line utils." ON)
 
30
option(ENABLE_CPP "Compile poppler cpp wrapper." ON)
 
31
option(ENABLE_ABIWORD "Build the Abiword backend." ON)
 
32
option(ENABLE_LIBOPENJPEG "Use libopenjpeg for JPX streams." ON)
 
33
option(ENABLE_LCMS "Use liblcms for color management." ON)
 
34
option(ENABLE_LIBCURL "Build libcurl based HTTP support." OFF)
 
35
option(ENABLE_ZLIB "Build with zlib (not totally safe)." OFF)
 
36
option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend" OFF)
 
37
option(USE_FLOAT "Use single precision arithmetic in the Splash backend" OFF)
 
38
if(WIN32)
 
39
  option(ENABLE_RELOCATABLE "Hardcode the poppler library location (on Windows)." ON)
 
40
else(WIN32)
 
41
  set(ENABLE_RELOCATABLE OFF)
 
42
endif(WIN32)
 
43
 
 
44
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
 
45
 
 
46
if(WIN32)
 
47
  set(_default_fontconfiguration "win32")
 
48
else(WIN32)
 
49
  set(_default_fontconfiguration "fontconfig")
 
50
endif(WIN32)
 
51
set(FONT_CONFIGURATION "${_default_fontconfiguration}" CACHE STRING "The font configuration backend (win32|fontconfig).")
 
52
string(TOLOWER "${FONT_CONFIGURATION}" font_configuration)
 
53
set(WITH_FONTCONFIGURATION_WIN32 OFF)
 
54
set(WITH_FONTCONFIGURATION_FONTCONFIG OFF)
 
55
if(font_configuration STREQUAL "win32")
 
56
  set(WITH_FONTCONFIGURATION_WIN32 ON)
 
57
elseif(font_configuration STREQUAL "fontconfig")
 
58
  set(WITH_FONTCONFIGURATION_FONTCONFIG ON)
 
59
else(font_configuration STREQUAL "win32")
 
60
  message(FATAL_ERROR "Invalid font configuration setting: ${FONT_CONFIGURATION}")
 
61
endif(font_configuration STREQUAL "win32")
 
62
 
 
63
# Enable these unconditionally.
 
64
set(MULTITHREADED ON)
 
65
set(OPI_SUPPORT ON)
 
66
set(TEXTOUT_WORD_LIST ON)
 
67
 
 
68
# setting the minimum required versions for some components
 
69
set(QT3_MIN_VERSION "3.3.0")
 
70
set(QT4_MIN_VERSION "4.4.0")
 
71
set(CAIRO_VERSION "1.10.0")
 
72
set(GLIB_REQUIRED "2.18")
 
73
 
 
74
macro_bool_to_01(ENABLE_SPLASH HAVE_SPLASH)
 
75
find_package(Freetype REQUIRED)
 
76
if(WITH_FONTCONFIGURATION_FONTCONFIG)
 
77
  find_package(Fontconfig REQUIRED)
 
78
endif(WITH_FONTCONFIGURATION_FONTCONFIG)
 
79
macro_optional_find_package(JPEG)
 
80
macro_optional_find_package(PNG)
 
81
if(JPEG_FOUND)
 
82
  set(ENABLE_LIBJPEG ${JPEG_FOUND})
 
83
endif(JPEG_FOUND)
 
84
macro_optional_find_package(Qt3)
 
85
macro_optional_find_package(Qt4)
 
86
macro_optional_find_package(Cairo ${CAIRO_VERSION})
 
87
if(CAIRO_FOUND)
 
88
  set(HAVE_CAIRO ${CAIRO_FOUND})
 
89
  set(CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
 
90
  set(CAIRO_REQ "cairo")
 
91
  set(POPPLER_GLIB_DISABLE_DEPRECATED "")
 
92
  set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "")
 
93
  macro_optional_find_package(GLIB)
 
94
  if(GLIB_FOUND)
 
95
    set(ENABLE_GLIB ON)
 
96
    # Check for introspection
 
97
    macro_optional_find_package(GObjectIntrospection 0.9.12)
 
98
    set(HAVE_INTROSPECTION ${INTROSPECTION_FOUND})
 
99
    set(GLIB_REQ "glib-2.0 >= ${GLIB_REQUIRED} gobject-2.0 >= ${GLIB_REQUIRED} cairo >= ${CAIRO_VERSION}")
 
100
    set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DG_DISABLE_DEPRECATED")
 
101
    set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DG_DISABLE_SINGLE_INCLUDES")
 
102
    macro_optional_find_package(GDK)
 
103
    macro_optional_find_package(GTK)
 
104
    if(GDK_FOUND)
 
105
      set(GDK_REQ "gdk-2.0 gdk-pixbuf-2.0")
 
106
      set(POPPLER_WITH_GDK ${GDK_FOUND})
 
107
      set(GDK_FEATURE "#define POPPLER_WITH_GDK 1")
 
108
      set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED")
 
109
      set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DGTK_DISABLE_SINGLE_INCLUDES")
 
110
    endif(GDK_FOUND)
 
111
  endif(GLIB_FOUND)
 
112
else(CAIRO_FOUND)
 
113
  set(CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO")
 
114
endif(CAIRO_FOUND)
 
115
if(ENABLE_CPP)
 
116
  macro_optional_find_package(Iconv)
 
117
  set(ENABLE_CPP ${ICONV_FOUND})
 
118
  set(HAVE_ICONV ${ICONV_FOUND})
 
119
endif(ENABLE_CPP)
 
120
if(ENABLE_ZLIB)
 
121
  find_package(ZLIB)
 
122
  if(ZLIB_FOUND)
 
123
    set(HAVE_LIBZ ${ZLIB_FOUND})
 
124
  endif(ZLIB_FOUND)
 
125
  set(ENABLE_ZLIB ${ZLIB_FOUND})
 
126
endif(ENABLE_ZLIB)
 
127
if(ENABLE_ABIWORD)
 
128
  find_package(LibXml2)
 
129
  set(ENABLE_ABIWORD ${LIBXML2_FOUND})
 
130
endif(ENABLE_ABIWORD)
 
131
if(ENABLE_LIBOPENJPEG)
 
132
  find_package(LIBOPENJPEG)
 
133
  set(ENABLE_LIBOPENJPEG ${LIBOPENJPEG_FOUND})
 
134
  set(HAVE_OPENJPEG_H ON)
 
135
endif(ENABLE_LIBOPENJPEG)
 
136
if(ENABLE_LCMS)
 
137
  find_package(LCMS)
 
138
  set(USE_CMS ${LCMS_FOUND})
 
139
endif(ENABLE_LCMS)
 
140
if(ENABLE_LIBCURL)
 
141
  find_package(CURL)
 
142
  include_directories(${CURL_INCLUDE_DIR})
 
143
  set(POPPLER_HAS_CURL_SUPPORT ON)
 
144
endif(ENABLE_LIBCURL)
 
145
 
 
146
add_definitions(-DHAVE_CONFIG_H=1)
 
147
if(FONTCONFIG_FOUND)
 
148
  add_definitions(${FONTCONFIG_DEFINITIONS})
 
149
endif(FONTCONFIG_FOUND)
 
150
if(WITH_FONTCONFIGURATION_WIN32)
 
151
  if(MINGW)
 
152
    # Set the minimum required Internet Explorer version to 5.0
 
153
    add_definitions(-D_WIN32_IE=0x0500)
 
154
  endif(MINGW)
 
155
endif(WITH_FONTCONFIGURATION_WIN32)
 
156
include_directories(
 
157
  ${CMAKE_CURRENT_SOURCE_DIR}
 
158
  ${CMAKE_CURRENT_SOURCE_DIR}/fofi
 
159
  ${CMAKE_CURRENT_SOURCE_DIR}/goo
 
160
  ${CMAKE_CURRENT_SOURCE_DIR}/poppler
 
161
  ${CMAKE_CURRENT_BINARY_DIR}
 
162
  ${CMAKE_CURRENT_BINARY_DIR}/poppler
 
163
  ${FREETYPE_INCLUDE_DIRS}
 
164
)
 
165
set(HAVE_FREETYPE_H ON)
 
166
if(CMAKE_USE_PTHREADS_INIT)
 
167
  set(HAVE_PTHREAD ON)
 
168
endif(CMAKE_USE_PTHREADS_INIT)
 
169
 
 
170
if(ENABLE_ZLIB)
 
171
  include_directories(${ZLIB_INCLUDE_DIR})
 
172
endif(ENABLE_ZLIB)
 
173
if(JPEG_FOUND)
 
174
  include_directories(${JPEG_INCLUDE_DIR})
 
175
  set(ENABLE_LIBJPEG ON)
 
176
endif(JPEG_FOUND)
 
177
if(PNG_FOUND)
 
178
  include_directories(${PNG_INCLUDE_DIR})
 
179
  set(ENABLE_LIBPNG ON)
 
180
endif(PNG_FOUND)
 
181
if(ENABLE_ABIWORD)
 
182
  include_directories(${LIBXML2_INCLUDE_DIR})
 
183
  add_definitions(${LIBXML2_DEFINITIONS})
 
184
endif(ENABLE_ABIWORD)
 
185
if(LIBOPENJPEG_FOUND)
 
186
  include_directories(${LIBOPENJPEG_INCLUDE_DIR})
 
187
endif(LIBOPENJPEG_FOUND)
 
188
if(LCMS_FOUND)
 
189
  include_directories(${LCMS_INCLUDE_DIR})
 
190
endif(LCMS_FOUND)
 
191
 
 
192
if(DEFINED COMPILE_WARNINGS)
 
193
else(DEFINED COMPILE_WARNINGS)
 
194
  set(COMPILE_WARNINGS "yes")
 
195
endif(DEFINED COMPILE_WARNINGS)
 
196
string(TOLOWER "${COMPILE_WARNINGS}" _comp_warnings)
 
197
if(_comp_warnings STREQUAL "no")
 
198
  set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_NO} ${CMAKE_CXX_FLAGS}")
 
199
endif(_comp_warnings STREQUAL "no")
 
200
if(_comp_warnings STREQUAL "yes")
 
201
  set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_YES} ${CMAKE_CXX_FLAGS}")
 
202
endif(_comp_warnings STREQUAL "yes")
 
203
if(_comp_warnings STREQUAL "kde")
 
204
  set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_KDE} ${CMAKE_CXX_FLAGS}")
 
205
endif(_comp_warnings STREQUAL "kde")
 
206
 
 
207
 
 
208
include(ConfigureChecks.cmake)
 
209
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
210
configure_file(poppler/poppler-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h)
 
211
 
 
212
 
 
213
set(poppler_SRCS
 
214
  goo/gfile.cc
 
215
  goo/gmempp.cc
 
216
  goo/GooHash.cc
 
217
  goo/GooList.cc
 
218
  goo/GooTimer.cc
 
219
  goo/GooString.cc
 
220
  goo/gmem.cc
 
221
  goo/FixedPoint.cc
 
222
  goo/PNGWriter.cc
 
223
  goo/JpegWriter.cc
 
224
  goo/ImgWriter.cc
 
225
  goo/gstrtod.cc
 
226
  fofi/FoFiBase.cc
 
227
  fofi/FoFiEncodings.cc
 
228
  fofi/FoFiTrueType.cc
 
229
  fofi/FoFiType1.cc
 
230
  fofi/FoFiType1C.cc
 
231
  poppler/Annot.cc
 
232
  poppler/Array.cc
 
233
  poppler/BuiltinFont.cc
 
234
  poppler/BuiltinFontTables.cc
 
235
  poppler/CachedFile.cc
 
236
  poppler/Catalog.cc
 
237
  poppler/CharCodeToUnicode.cc
 
238
  poppler/CMap.cc
 
239
  poppler/DateInfo.cc
 
240
  poppler/Decrypt.cc
 
241
  poppler/Dict.cc
 
242
  poppler/Error.cc
 
243
  poppler/FileSpec.cc
 
244
  poppler/FontEncodingTables.cc
 
245
  poppler/Form.cc
 
246
  poppler/FontInfo.cc
 
247
  poppler/Function.cc
 
248
  poppler/Gfx.cc
 
249
  poppler/GfxFont.cc
 
250
  poppler/GfxState.cc
 
251
  poppler/GlobalParams.cc
 
252
  poppler/Hints.cc
 
253
  poppler/JArithmeticDecoder.cc
 
254
  poppler/JBIG2Stream.cc
 
255
  poppler/Lexer.cc
 
256
  poppler/Link.cc
 
257
  poppler/Linearization.cc
 
258
  poppler/LocalPDFDocBuilder.cc
 
259
  poppler/NameToCharCode.cc
 
260
  poppler/Object.cc
 
261
  poppler/OptionalContent.cc
 
262
  poppler/Outline.cc
 
263
  poppler/OutputDev.cc
 
264
  poppler/Page.cc
 
265
  poppler/PageTransition.cc
 
266
  poppler/Parser.cc
 
267
  poppler/PDFDoc.cc
 
268
  poppler/PDFDocEncoding.cc
 
269
  poppler/PDFDocFactory.cc
 
270
  poppler/PopplerCache.cc
 
271
  poppler/ProfileData.cc
 
272
  poppler/PreScanOutputDev.cc
 
273
  poppler/PSTokenizer.cc
 
274
  poppler/Stream.cc
 
275
  poppler/strtok_r.cpp
 
276
  poppler/UnicodeMap.cc
 
277
  poppler/UnicodeTypeTable.cc
 
278
  poppler/XRef.cc
 
279
  poppler/PSOutputDev.cc
 
280
  poppler/TextOutputDev.cc
 
281
  poppler/PageLabelInfo.cc
 
282
  poppler/SecurityHandler.cc
 
283
  poppler/StdinCachedFile.cc
 
284
  poppler/StdinPDFDocBuilder.cc
 
285
  poppler/Sound.cc
 
286
  poppler/XpdfPluginAPI.cc
 
287
  poppler/Movie.cc
 
288
  poppler/Rendition.cc
 
289
)
 
290
set(poppler_LIBS ${FREETYPE_LIBRARIES})
 
291
if(ENABLE_SPLASH)
 
292
  set(poppler_SRCS ${poppler_SRCS}
 
293
    poppler/SplashOutputDev.cc
 
294
    splash/Splash.cc
 
295
    splash/SplashBitmap.cc
 
296
    splash/SplashClip.cc
 
297
    splash/SplashFTFont.cc
 
298
    splash/SplashFTFontEngine.cc
 
299
    splash/SplashFTFontFile.cc
 
300
    splash/SplashFont.cc
 
301
    splash/SplashFontEngine.cc
 
302
    splash/SplashFontFile.cc
 
303
    splash/SplashFontFileID.cc
 
304
    splash/SplashPath.cc
 
305
    splash/SplashPattern.cc
 
306
    splash/SplashScreen.cc
 
307
    splash/SplashState.cc
 
308
    splash/SplashT1Font.cc
 
309
    splash/SplashT1FontEngine.cc
 
310
    splash/SplashT1FontFile.cc
 
311
    splash/SplashXPath.cc
 
312
    splash/SplashXPathScanner.cc
 
313
  )
 
314
endif(ENABLE_SPLASH)
 
315
if(FONTCONFIG_FOUND)
 
316
  set(poppler_LIBS ${poppler_LIBS} ${FONTCONFIG_LIBRARIES})
 
317
endif(FONTCONFIG_FOUND)
 
318
if(JPEG_FOUND)
 
319
  set(poppler_SRCS ${poppler_SRCS}
 
320
    poppler/DCTStream.cc
 
321
  )
 
322
  set(poppler_LIBS ${poppler_LIBS} ${JPEG_LIBRARIES})
 
323
endif(JPEG_FOUND)
 
324
if(ENABLE_ZLIB)
 
325
  set(poppler_SRCS ${poppler_SRCS}
 
326
    poppler/FlateStream.cc
 
327
  )
 
328
  set(poppler_LIBS ${poppler_LIBS} ${ZLIB_LIBRARIES})
 
329
endif(ENABLE_ZLIB)
 
330
if(ENABLE_LIBCURL)
 
331
  set(poppler_SRCS ${poppler_SRCS}
 
332
    poppler/CurlCachedFile.cc
 
333
    poppler/CurlPDFDocBuilder.cc
 
334
  )
 
335
  set(poppler_LIBS ${poppler_LIBS} ${CURL_LIBRARIES})
 
336
endif(ENABLE_LIBCURL)
 
337
if(LIBOPENJPEG_FOUND)
 
338
  set(poppler_SRCS ${poppler_SRCS}
 
339
    poppler/JPEG2000Stream.cc
 
340
  )
 
341
  set(poppler_LIBS ${poppler_LIBS} ${LIBOPENJPEG_LIBRARIES})
 
342
else (LIBOPENJPEG_FOUND)
 
343
  set(poppler_SRCS ${poppler_SRCS}
 
344
    poppler/JPXStream.cc
 
345
  )
 
346
endif(LIBOPENJPEG_FOUND)
 
347
if(USE_CMS)
 
348
  set(poppler_LIBS ${poppler_LIBS} ${LCMS_LIBRARIES})
 
349
endif(USE_CMS)
 
350
if(ENABLE_ABIWORD)
 
351
  set(poppler_SRCS ${poppler_SRCS}
 
352
    poppler/ABWOutputDev.cc
 
353
  )
 
354
  set(poppler_LIBS ${poppler_LIBS} ${LIBXML2_LIBRARIES})
 
355
endif(ENABLE_ABIWORD)
 
356
if(WIN32)
 
357
  # gdi32 is needed under win32
 
358
  set(poppler_LIBS ${poppler_LIBS} gdi32)
 
359
endif(WIN32)
 
360
if(PNG_FOUND)
 
361
  set(poppler_LIBS ${poppler_LIBS} ${PNG_LIBRARIES})
 
362
endif(PNG_FOUND)
 
363
 
 
364
if(MSVC)
 
365
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 
366
add_library(poppler STATIC ${poppler_SRCS})
 
367
else(MSVC)
 
368
add_library(poppler SHARED ${poppler_SRCS})
 
369
endif(MSVC)
 
370
set_target_properties(poppler PROPERTIES VERSION 13.0.0 SOVERSION 13)
 
371
target_link_libraries(poppler ${poppler_LIBS})
 
372
target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")
 
373
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
 
374
 
 
375
if(ENABLE_XPDF_HEADERS)
 
376
  install(FILES
 
377
    poppler/Annot.h
 
378
    poppler/Array.h
 
379
    poppler/BuiltinFont.h
 
380
    poppler/BuiltinFontTables.h
 
381
    poppler/CachedFile.h
 
382
    poppler/Catalog.h
 
383
    poppler/CharCodeToUnicode.h
 
384
    poppler/CMap.h
 
385
    poppler/DateInfo.h
 
386
    poppler/Decrypt.h
 
387
    poppler/Dict.h
 
388
    poppler/Error.h
 
389
    poppler/FileSpec.h
 
390
    poppler/FontEncodingTables.h
 
391
    poppler/FontInfo.h
 
392
    poppler/Form.h
 
393
    poppler/Function.cc
 
394
    poppler/Function.h
 
395
    poppler/Gfx.h
 
396
    poppler/GfxFont.h
 
397
    poppler/GfxState.h
 
398
    poppler/GfxState_helpers.h
 
399
    poppler/GlobalParams.h
 
400
    poppler/Hints.h
 
401
    poppler/JArithmeticDecoder.h
 
402
    poppler/JBIG2Stream.h
 
403
    poppler/Lexer.h
 
404
    poppler/Link.h
 
405
    poppler/Linearization.h
 
406
    poppler/LocalPDFDocBuilder.h
 
407
    poppler/Movie.h
 
408
    poppler/NameToCharCode.h
 
409
    poppler/Object.h
 
410
    poppler/OptionalContent.h
 
411
    poppler/Outline.h
 
412
    poppler/OutputDev.h
 
413
    poppler/Page.h
 
414
    poppler/PageTransition.h
 
415
    poppler/Parser.h
 
416
    poppler/PDFDoc.h
 
417
    poppler/PDFDocBuilder.h
 
418
    poppler/PDFDocEncoding.h
 
419
    poppler/PDFDocFactory.h
 
420
    poppler/PopplerCache.h
 
421
    poppler/ProfileData.h
 
422
    poppler/PreScanOutputDev.h
 
423
    poppler/PSTokenizer.h
 
424
    poppler/Rendition.h
 
425
    poppler/Stream-CCITT.h
 
426
    poppler/Stream.h
 
427
    poppler/UnicodeMap.h
 
428
    poppler/UnicodeMapTables.h
 
429
    poppler/UnicodeTypeTable.h
 
430
    poppler/UnicodeCClassTables.h
 
431
    poppler/UnicodeCompTables.h
 
432
    poppler/UnicodeDecompTables.h
 
433
    poppler/XRef.h
 
434
    poppler/CharTypes.h
 
435
    poppler/CompactFontTables.h
 
436
    poppler/ErrorCodes.h
 
437
    poppler/NameToUnicodeTable.h
 
438
    poppler/PSOutputDev.h
 
439
    poppler/TextOutputDev.h
 
440
    poppler/SecurityHandler.h
 
441
    poppler/StdinCachedFile.h
 
442
    poppler/StdinPDFDocBuilder.h
 
443
    poppler/UTF8.h
 
444
    poppler/XpdfPluginAPI.h
 
445
    poppler/Sound.h
 
446
    ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h
 
447
    DESTINATION include/poppler)
 
448
  install(FILES
 
449
    goo/GooHash.h
 
450
    goo/GooList.h
 
451
    goo/GooTimer.h
 
452
    goo/GooMutex.h
 
453
    goo/GooString.h
 
454
    goo/gtypes.h
 
455
    goo/gmem.h
 
456
    goo/gfile.h
 
457
    goo/FixedPoint.h
 
458
    goo/ImgWriter.h
 
459
    goo/GooLikely.h
 
460
    goo/gstrtod.h
 
461
    DESTINATION include/poppler/goo)
 
462
  if(PNG_FOUND)
 
463
    install(FILES
 
464
      goo/PNGWriter.h
 
465
      DESTINATION include/poppler/goo)
 
466
  endif(PNG_FOUND)
 
467
  install(FILES
 
468
    fofi/FoFiBase.h
 
469
    fofi/FoFiEncodings.h
 
470
    fofi/FoFiTrueType.h
 
471
    fofi/FoFiType1.h
 
472
    fofi/FoFiType1C.h
 
473
    DESTINATION include/poppler/fofi)
 
474
  if(ENABLE_LIBCURL)
 
475
    install(FILES
 
476
      poppler/CurlCachedFile.h
 
477
      poppler/CurlPDFDocBuilder.h
 
478
      DESTINATION include/poppler)
 
479
  endif(ENABLE_LIBCURL)
 
480
  if(LIBOPENJPEG_FOUND)
 
481
    install(FILES
 
482
      poppler/JPEG2000Stream.h
 
483
      DESTINATION include/poppler)
 
484
    install(FILES
 
485
      goo/JpegWriter.h
 
486
      DESTINATION include/poppler/goo)
 
487
  else(LIBOPENJPEG_FOUND)
 
488
    install(FILES
 
489
      poppler/JPXStream.h
 
490
      DESTINATION include/poppler)
 
491
  endif(LIBOPENJPEG_FOUND)
 
492
  if(ENABLE_SPLASH)
 
493
    install(FILES
 
494
      poppler/SplashOutputDev.h
 
495
      DESTINATION include/poppler)
 
496
    install(FILES
 
497
      splash/Splash.h
 
498
      splash/SplashBitmap.h
 
499
      splash/SplashClip.h
 
500
      splash/SplashErrorCodes.h
 
501
      splash/SplashFTFont.h
 
502
      splash/SplashFTFontEngine.h
 
503
      splash/SplashFTFontFile.h
 
504
      splash/SplashFont.h
 
505
      splash/SplashFontEngine.h
 
506
      splash/SplashFontFile.h
 
507
      splash/SplashFontFileID.h
 
508
      splash/SplashGlyphBitmap.h
 
509
      splash/SplashMath.h
 
510
      splash/SplashPath.h
 
511
      splash/SplashPattern.h
 
512
      splash/SplashScreen.h
 
513
      splash/SplashState.h
 
514
      splash/SplashT1Font.h
 
515
      splash/SplashT1FontEngine.h
 
516
      splash/SplashT1FontFile.h
 
517
      splash/SplashTypes.h
 
518
      splash/SplashXPath.h
 
519
      splash/SplashXPathScanner.h
 
520
      DESTINATION include/poppler/splash)
 
521
  endif(ENABLE_SPLASH)
 
522
endif(ENABLE_XPDF_HEADERS)
 
523
 
 
524
 
 
525
if(ENABLE_UTILS)
 
526
  add_subdirectory(utils)
 
527
endif(ENABLE_UTILS)
 
528
if(ENABLE_GLIB)
 
529
  add_subdirectory(glib)
 
530
endif(ENABLE_GLIB)
 
531
if(QT3_FOUND)
 
532
  add_subdirectory(qt)
 
533
endif(QT3_FOUND)
 
534
add_subdirectory(test)
 
535
if(QT4_FOUND)
 
536
  add_subdirectory(qt4)
 
537
endif(QT4_FOUND)
 
538
if(ENABLE_CPP)
 
539
  add_subdirectory(cpp)
 
540
endif(ENABLE_CPP)
 
541
 
 
542
set(PKG_CONFIG_VERSION_0_18 TRUE)
 
543
if(PKG_CONFIG_EXECUTABLE)
 
544
  exec_program(${PKG_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _output_VAR)
 
545
  macro_ensure_version("0.18" "${_output_VAR}" PKG_CONFIG_VERSION_0_18)
 
546
endif(PKG_CONFIG_EXECUTABLE)
 
547
if(PKG_CONFIG_VERSION_0_18)
 
548
  set(PC_REQUIRES "")
 
549
  set(PC_REQUIRES_PRIVATE "Requires.private: poppler = ${POPPLER_VERSION}")
 
550
else(PKG_CONFIG_VERSION_0_18)
 
551
  set(PC_REQUIRES "poppler = ${POPPLER_VERSION}")
 
552
  set(PC_REQUIRES_PRIVATE "")
 
553
endif(PKG_CONFIG_VERSION_0_18)
 
554
 
 
555
poppler_create_install_pkgconfig(poppler.pc lib${LIB_SUFFIX}/pkgconfig)
 
556
if(ENABLE_SPLASH)
 
557
  poppler_create_install_pkgconfig(poppler-splash.pc lib${LIB_SUFFIX}/pkgconfig)
 
558
endif(ENABLE_SPLASH)
 
559
if(QT3_FOUND)
 
560
  poppler_create_install_pkgconfig(poppler-qt.pc lib${LIB_SUFFIX}/pkgconfig)
 
561
endif(QT3_FOUND)
 
562
if(QT4_FOUND)
 
563
  poppler_create_install_pkgconfig(poppler-qt4.pc lib${LIB_SUFFIX}/pkgconfig)
 
564
endif(QT4_FOUND)
 
565
if(ENABLE_GLIB)
 
566
  poppler_create_install_pkgconfig(poppler-glib.pc lib${LIB_SUFFIX}/pkgconfig)
 
567
endif(ENABLE_GLIB)
 
568
if(CAIRO_FOUND)
 
569
  poppler_create_install_pkgconfig(poppler-cairo.pc lib${LIB_SUFFIX}/pkgconfig)
 
570
endif(CAIRO_FOUND)
 
571
if(ENABLE_CPP)
 
572
  poppler_create_install_pkgconfig(poppler-cpp.pc lib${LIB_SUFFIX}/pkgconfig)
 
573
endif(ENABLE_CPP)
 
574
 
 
575
 
 
576
message("Building Poppler with support for:")
 
577
show_end_message("font configuration" ${font_configuration})
 
578
show_end_message_yesno("splash output" ENABLE_SPLASH)
 
579
show_end_message_yesno("cairo output" CAIRO_FOUND)
 
580
show_end_message_yesno("abiword output" ENABLE_ABIWORD)
 
581
show_end_message_yesno("qt wrapper" QT3_FOUND)
 
582
show_end_message_yesno("qt4 wrapper" QT4_FOUND)
 
583
show_end_message_yesno("glib wrapper" ENABLE_GLIB)
 
584
show_end_message_yesno("  use GDK" POPPLER_WITH_GDK)
 
585
show_end_message_yesno("  introspection" INTROSPECTION_FOUND)
 
586
show_end_message_yesno("cpp wrapper" ENABLE_CPP)
 
587
show_end_message("use gtk-doc" "not supported with this CMake build system")
 
588
show_end_message_yesno("use libjpeg" ENABLE_LIBJPEG)
 
589
show_end_message_yesno("use libpng" ENABLE_LIBPNG)
 
590
show_end_message_yesno("use zlib" ENABLE_ZLIB)
 
591
show_end_message_yesno("use curl" ENABLE_LIBCURL)
 
592
show_end_message_yesno("use libopenjpeg" LIBOPENJPEG_FOUND)
 
593
show_end_message_yesno("use cms" USE_CMS)
 
594
show_end_message_yesno("command line utils" ENABLE_UTILS)
 
595
 
 
596
if(USE_FIXEDPOINT AND USE_FLOAT)
 
597
  message("Warning: Single precision and fixed point options should not be enabled at the same time")
 
598
endif(USE_FIXEDPOINT AND USE_FLOAT)