summaryrefslogtreecommitdiff
path: root/utils/CMakeLists.txt
blob: a36616dac83856283614adf1eae6203741ea52ef (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

set(common_srcs
  parseargs.cc
)
set(common_libs
  poppler
)
if (FONTCONFIG_FOUND)
  set(common_libs ${common_libs} ${FONTCONFIG_LIBRARIES})
endif (FONTCONFIG_FOUND)

if (ENABLE_SPLASH)
  # pdftoppm
  set(pdftoppm_SOURCES ${common_srcs}
    pdftoppm.cc
  )
  add_executable(pdftoppm ${pdftoppm_SOURCES})
  target_link_libraries(pdftoppm ${common_libs})
  install(TARGETS pdftoppm DESTINATION bin)
  install(FILES pdftoppm.1 DESTINATION share/man/man1)
endif (ENABLE_SPLASH)

if (HAVE_CAIRO)
  # pdftocairo
  set(pdftocairo_SOURCES ${common_srcs}
    pdftocairo.cc
    ${CMAKE_SOURCE_DIR}/poppler/CairoFontEngine.cc
    ${CMAKE_SOURCE_DIR}/poppler/CairoOutputDev.cc
    ${CMAKE_SOURCE_DIR}/poppler/CairoRescaleBox.cc
  )
  include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_CURRENT_BINARY_DIR}
    ${CAIRO_INCLUDE_DIRS}
  )
  add_definitions(${CAIRO_CFLAGS})
  add_executable(pdftocairo ${pdftocairo_SOURCES})
  target_link_libraries(pdftocairo ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES} ${common_libs})
  if(LCMS_FOUND)
    target_link_libraries(pdftocairo ${LCMS_LIBRARIES})
  endif(LCMS_FOUND)
  install(TARGETS pdftocairo DESTINATION bin)
  install(FILES pdftocairo.1 DESTINATION share/man/man1)
endif (HAVE_CAIRO)

# pdffonts
set(pdffonts_SOURCES ${common_srcs}
  pdffonts.cc
)
add_executable(pdffonts ${pdffonts_SOURCES})
target_link_libraries(pdffonts ${common_libs})
install(TARGETS pdffonts DESTINATION bin)
install(FILES pdffonts.1 DESTINATION share/man/man1)

# pdfimages
set(pdfimages_SOURCES ${common_srcs}
  pdfimages.cc
  ImageOutputDev.cc
  ImageOutputDev.h
)
add_executable(pdfimages ${pdfimages_SOURCES})
target_link_libraries(pdfimages ${common_libs})
install(TARGETS pdfimages DESTINATION bin)
install(FILES pdfimages.1 DESTINATION share/man/man1)

# pdfinfo
set(pdfinfo_SOURCES ${common_srcs}
  pdfinfo.cc printencodings.cc
)
add_executable(pdfinfo ${pdfinfo_SOURCES})
target_link_libraries(pdfinfo ${common_libs})
install(TARGETS pdfinfo DESTINATION bin)
install(FILES pdfinfo.1 DESTINATION share/man/man1)

# pdftops
set(pdftops_SOURCES ${common_srcs}
  pdftops.cc
)
add_executable(pdftops ${pdftops_SOURCES})
target_link_libraries(pdftops ${common_libs})
install(TARGETS pdftops DESTINATION bin)
install(FILES pdftops.1 DESTINATION share/man/man1)

# pdftotext
set(pdftotext_SOURCES ${common_srcs}
  pdftotext.cc printencodings.cc
)
add_executable(pdftotext ${pdftotext_SOURCES})
target_link_libraries(pdftotext ${common_libs})
install(TARGETS pdftotext DESTINATION bin)
install(FILES pdftotext.1 DESTINATION share/man/man1)

# pdftohtml
set(pdftohtml_SOURCES ${common_srcs}
  pdftohtml.cc
  HtmlFonts.cc
  HtmlLinks.cc
  HtmlOutputDev.cc
)
add_executable(pdftohtml ${pdftohtml_SOURCES})
target_link_libraries(pdftohtml ${common_libs})
install(TARGETS pdftohtml DESTINATION bin)
install(FILES pdftohtml.1 DESTINATION share/man/man1)

# pdfextract
set(pdfextract_SOURCES ${common_srcs}
  pdfextract.cc
)
add_executable(pdfextract ${pdfextract_SOURCES})
target_link_libraries(pdfextract ${common_libs})
install(TARGETS pdfextract DESTINATION bin)
install(FILES pdfextract.1 DESTINATION share/man/man1)

# pdfmerge
set(pdfmerge_SOURCES ${common_srcs}
  pdfmerge.cc
)
add_executable(pdfmerge ${pdfmerge_SOURCES})
target_link_libraries(pdfmerge ${common_libs})
install(TARGETS pdfmerge DESTINATION bin)
install(FILES pdfmerge.1 DESTINATION share/man/man1)