Prepare for conversion of Guide chapters to AsciiDoc.
[metze/wireshark/wip.git] / docbook / CMakeLists.txt
1 # CMakeLists.txt
2 #
3 # $Id$
4 #
5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 1998 Gerald Combs
8 #
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #
23
24
25 set(WSUG_FILES
26         wsug_src/WSUG_app_files.xml
27         wsug_src/WSUG_app_howitworks.xml
28         wsug_src/WSUG_app_messages.xml
29         wsug_src/WSUG_app_protocols.xml
30         wsug_src/WSUG_app_tools.xml
31         wsug_src/WSUG_chapter_advanced.xml
32         wsug_src/WSUG_chapter_build_install.xml
33         wsug_src/WSUG_chapter_capture.xml
34         wsug_src/WSUG_chapter_customize.xml
35         wsug_src/WSUG_chapter_introduction.xml
36         wsug_src/WSUG_chapter_io.xml
37         wsug_src/WSUG_chapter_statistics.xml
38         wsug_src/WSUG_chapter_telephony.xml
39         wsug_src/WSUG_chapter_troubleshoot.xml
40         wsug_src/WSUG_chapter_use.xml
41         wsug_src/WSUG_chapter_work.xml
42         wsug_src/WSUG_meta_info.xml
43         wsug_src/WSUG_preface.xml
44         wsluarm.xml
45         ws.css
46 )
47
48 set(WSUG_GRAPHICS
49         wsug_graphics/ws-analyze-menu.png
50         wsug_graphics/ws-bytes-pane-tabs.png
51         wsug_graphics/ws-bytes-pane.png
52         wsug_graphics/ws-capture-info.png
53         wsug_graphics/ws-capture-interfaces.png
54         wsug_graphics/ws-capture-interfaces-win32.png
55         wsug_graphics/ws-capture-menu.png
56         wsug_graphics/ws-capture-options.png
57         wsug_graphics/ws-capture-options-remote-capture.png
58         wsug_graphics/ws-capture-options-remote-interface.png
59         wsug_graphics/ws-capture-options-remote-settings.png
60         wsug_graphics/ws-capture-preferences.png
61         wsug_graphics/ws-choose-color-rule.png
62         wsug_graphics/ws-coloring-fields.png
63         wsug_graphics/ws-coloring-rules-dialog.png
64         wsug_graphics/ws-column-header-popup-menu.png
65         wsug_graphics/ws-decode-as-show.png
66         wsug_graphics/ws-decode-as.png
67         wsug_graphics/ws-column-header-popup-menu.png
68         wsug_graphics/ws-details-pane-popup-menu.png
69         wsug_graphics/ws-details-pane.png
70         wsug_graphics/ws-display-filter-tcp.png
71         wsug_graphics/ws-edit-color-rule-dialog.png
72         wsug_graphics/ws-edit-menu.png
73         wsug_graphics/ws-enabled-protocols.png
74         wsug_graphics/ws-expert-colored-tree.png
75         wsug_graphics/ws-expert-column.png
76         wsug_graphics/ws-expert-infos.png
77         wsug_graphics/ws-export-objects.png
78         wsug_graphics/ws-export-pdml.png
79         wsug_graphics/ws-export-plain.png
80         wsug_graphics/ws-export-ps.png
81         wsug_graphics/ws-export-psml.png
82         wsug_graphics/ws-export-selected.png
83         wsug_graphics/ws-file-import.png
84         wsug_graphics/ws-file-menu.png
85         wsug_graphics/ws-file-set-dialog.png
86         wsug_graphics/ws-filter-add-expression.png
87         wsug_graphics/ws-filter-toolbar.png
88         wsug_graphics/ws-filters.png
89         wsug_graphics/ws-find-packet.png
90         wsug_graphics/ws-follow-stream.png
91         wsug_graphics/ws-go-menu.png
92         wsug_graphics/ws-goto-packet.png
93         wsug_graphics/ws-gui-colors-preferences.png
94         wsug_graphics/ws-gui-columns-preferences.png
95         wsug_graphics/ws-gui-config-profiles.png
96         wsug_graphics/ws-gui-font-preferences.png
97         wsug_graphics/ws-gui-layout-preferences.png
98         wsug_graphics/ws-gui-preferences.png
99         wsug_graphics/ws-help-menu.png
100         wsug_graphics/ws-internals-menu.png
101         wsug_graphics/ws-list-pane.png
102         wsug_graphics/ws-logo.png
103         wsug_graphics/ws-main-toolbar.png
104         wsug_graphics/ws-main.png
105         wsug_graphics/ws-menu.png
106         wsug_graphics/ws-merge-gtk20.png
107         wsug_graphics/ws-merge-gtk24.png
108         wsug_graphics/ws-merge-win32.png
109         wsug_graphics/ws-nameresolution-preferences.png
110         wsug_graphics/ws-open-gtk20.png
111         wsug_graphics/ws-open-gtk24.png
112         wsug_graphics/ws-open-win32.png
113         wsug_graphics/ws-packet-format.png
114         wsug_graphics/ws-packet-pane-popup-menu.png
115         wsug_graphics/ws-packet-range.png
116         wsug_graphics/ws-packet-selected.png
117         wsug_graphics/ws-packet-sep-win.png
118         wsug_graphics/ws-print.png
119         wsug_graphics/ws-printing-preferences.png
120         wsug_graphics/ws-save-as-gtk20.png
121         wsug_graphics/ws-save-as-gtk24.png
122         wsug_graphics/ws-save-as-win32.png
123         wsug_graphics/ws-statistics-menu.png
124         wsug_graphics/ws-stats-conversations.png
125         wsug_graphics/ws-stats-endpoints.png
126         wsug_graphics/ws-stats-hierarchy.png
127         wsug_graphics/ws-stats-iographs.png
128         wsug_graphics/ws-stats-srt-dcerpc-filter.png
129         wsug_graphics/ws-stats-srt-dcerpc.png
130         wsug_graphics/ws-stats-summary.png
131         wsug_graphics/ws-stats-lte-mac-traffic.png
132         wsug_graphics/ws-stats-lte-rlc-traffic.png
133         wsug_graphics/ws-stats-wlan-traffic.png
134         wsug_graphics/ws-statusbar-empty.png
135         wsug_graphics/ws-statusbar-loaded.png
136         wsug_graphics/ws-statusbar-selected.png
137         wsug_graphics/ws-telephony-menu.png
138         wsug_graphics/ws-time-reference.png
139         wsug_graphics/ws-tools-menu.png
140         wsug_graphics/ws-view-menu.png
141         wsug_graphics/note.png
142         wsug_graphics/tip.png
143         wsug_graphics/warning.png
144         wsug_graphics/toolbar/autoscroll_24.png
145         wsug_graphics/toolbar/capture_filter_24.png
146         wsug_graphics/toolbar/capture_interfaces_24.png
147         wsug_graphics/toolbar/capture_options_24.png
148         wsug_graphics/toolbar/capture_restart_24.png
149         wsug_graphics/toolbar/capture_start_24.png
150         wsug_graphics/toolbar/capture_stop_24.png
151         wsug_graphics/toolbar/colorize_24.png
152         wsug_graphics/toolbar/display_filter_24.png
153         wsug_graphics/toolbar/resize_columns_24.png
154         wsug_graphics/toolbar/stock_add_24.png
155         wsug_graphics/toolbar/stock_apply_20.png
156         wsug_graphics/toolbar/stock_bottom_24.png
157         wsug_graphics/toolbar/stock_clear_24.png
158         wsug_graphics/toolbar/stock_close_24.png
159         wsug_graphics/toolbar/stock_colorselector_24.png
160         wsug_graphics/toolbar/stock_help_24.png
161         wsug_graphics/toolbar/stock_jump_to_24.png
162         wsug_graphics/toolbar/stock_left_arrow_24.png
163         wsug_graphics/toolbar/stock_open_24.png
164         wsug_graphics/toolbar/stock_preferences_24.png
165         wsug_graphics/toolbar/stock_print_24.png
166         wsug_graphics/toolbar/stock_properties_24.png
167         wsug_graphics/toolbar/stock_refresh_24.png
168         wsug_graphics/toolbar/stock_right_arrow_24.png
169         wsug_graphics/toolbar/stock_save_24.png
170         wsug_graphics/toolbar/stock_save_as_24.png
171         wsug_graphics/toolbar/stock_search_24.png
172         wsug_graphics/toolbar/stock_stop_24.png
173         wsug_graphics/toolbar/stock_top_24.png
174         wsug_graphics/toolbar/stock_zoom_1_24.png
175         wsug_graphics/toolbar/stock_zoom_in_24.png
176         wsug_graphics/toolbar/stock_zoom_out_24.png
177 )
178
179 set(WSDG_FILES
180         wsdg_src/WSDG_chapter_build_intro.xml
181         wsdg_src/WSDG_chapter_capture.xml
182         wsdg_src/WSDG_chapter_dissection.xml
183         wsdg_src/WSDG_chapter_env_intro.xml
184         wsdg_src/WSDG_chapter_libraries.xml
185         wsdg_src/WSDG_chapter_quick_setup.xml
186         wsdg_src/WSDG_chapter_sources.xml
187         wsdg_src/WSDG_chapter_tools.xml
188         wsdg_src/WSDG_chapter_userinterface.xml
189         wsdg_src/WSDG_chapter_works.xml
190         wsdg_src/WSDG_meta_info.xml
191         wsdg_src/WSDG_preface.xml
192         ws.css
193 )
194
195 set(WSDG_ASCIIDOC_FILES
196         wsdg_src/WSDG_chapter_sources.asciidoc
197 )
198
199 set(WSDG_GRAPHICS
200         wsdg_graphics/ws-capture-sync.dia
201         wsdg_graphics/ws-capture-sync.png
202         wsdg_graphics/ws-capture_internals.dia
203         wsdg_graphics/ws-capture_internals.png
204         wsdg_graphics/ws-function-blocks.dia
205         wsdg_graphics/ws-function-blocks.png
206         wsdg_graphics/ws-logo.png
207         wsdg_graphics/note.png
208         wsdg_graphics/tip.png
209         wsdg_graphics/warning.png
210 )
211
212 # user-guide.xml must be first in the list
213 set(WSUG_SOURCE
214         user-guide.xml
215         git_version.xml
216         wsluarm
217         ${WSUG_FILES}
218         ${WSUG_GRAPHICS}
219 )
220
221 # developer-guide.xml must be first in the list
222 set(WSDG_SOURCE
223         developer-guide.xml
224         git_version.xml
225         ${WSDG_FILES}
226         ${WSDG_GRAPHICS}
227 )
228
229 set(WSLUA_MODULES
230         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_dumper.c
231         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_field.c
232         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_gui.c
233         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_listener.c
234         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_pinfo.c
235         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_proto.c
236         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_tree.c
237         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_tvb.c
238         ${CMAKE_SOURCE_DIR}/epan/wslua/wslua_util.c
239 )
240
241 find_package( FOP ) # Call before XSLTPROC
242 find_package( LYNX )
243 find_package( XSLTPROC )
244 find_package( XMLLINT )
245 find_package( ASCIIDOC )
246
247 ADD_CUSTOM_COMMAND(
248         OUTPUT
249                 git_version.xml
250         COMMAND ${SH}
251                 ${CMAKE_CURRENT_SOURCE_DIR}/check_git_version.sh
252         DEPENDS
253                 ${CMAKE_CURRENT_SOURCE_DIR}/check_git_version.sh
254 )
255
256 add_custom_target(
257         user_guides ALL
258         DEPENDS
259                 wsluarm
260                 wsug_html_chunked/index.html
261                 wsug_html/index.html
262                 user-guide-a4.pdf
263                 user-guide-us.pdf
264 )
265
266 VALIDATE_XML(
267         wsug.validated
268         WSUG_SOURCE
269 )
270
271 XML2HTML(
272         wsug.validated
273         wsug_html/index.html
274         single-page
275         WSUG_SOURCE
276         WSUG_GRAPHICS
277 )
278
279 XML2HTML(
280         wsug.validated
281         wsug_html_chunked/index.html
282         chunked
283         WSUG_SOURCE
284         WSUG_GRAPHICS
285 )
286
287 # 2do: Merge A4 and letter into the smallest dimension of each format.
288 #      Use   --stringparam  page.height <letter-height>mm --stringparam  page.width <at-width>mm
289 #      Test the effect of this on letter and a4 printers first (ps and non-ps).
290
291 XML2PDF(
292         user-guide-a4.pdf
293         WSUG_SOURCE
294         custom_layer_pdf.xsl
295         A4
296 )
297
298 XML2PDF(
299         user-guide-us.pdf
300         WSUG_SOURCE
301         custom_layer_pdf.xsl
302         letter
303 )
304
305 add_custom_target(
306         developer_guides ALL
307         DEPENDS
308                 wsluarm
309                 wsdg_html_chunked/index.html
310                 wsdg_html/index.html
311                 developer-guide-a4.pdf
312                 developer-guide-us.pdf
313 )
314
315 VALIDATE_XML(
316         wsdg.validated
317         WSDG_SOURCE
318 )
319
320 ASCIIDOC2CHAPTER(WSDG_ASCIIDOC_FILES)
321 XML2HTML(
322         wsdg.validated
323         wsdg_html/index.html
324         single-page
325         WSDG_SOURCE
326         WSDG_GRAPHICS
327 )
328
329 XML2HTML(
330         wsdg.validated
331         wsdg_html_chunked/index.html
332         chunked
333         WSDG_SOURCE
334         WSDG_GRAPHICS
335 )
336
337 XML2PDF(
338         developer-guide-a4.pdf
339         WSDG_SOURCE
340         custom_layer_pdf.xsl
341         A4
342 )
343
344 XML2PDF(
345         developer-guide-us.pdf
346         WSDG_SOURCE
347         custom_layer_pdf.xsl
348         letter
349 )
350
351 # release_notes: release-notes.html release-notes.txt release-notes-a4.pdf release-notes-us.pdf
352
353 add_custom_target(
354         release_notes ALL
355         DEPENDS
356                 release-notes.html
357                 release-notes.txt
358                 release-notes-a4.pdf
359                 release-notes-us.pdf
360                 ${CMAKE_SOURCE_DIR}/NEWS
361 )
362
363 ADD_CUSTOM_COMMAND(
364         OUTPUT
365                 ${CMAKE_SOURCE_DIR}/NEWS
366         COMMAND cp
367                 ${CMAKE_CURRENT_BINARY_DIR}/release-notes.txt
368                 ${CMAKE_SOURCE_DIR}/NEWS
369         DEPENDS
370                 ${CMAKE_CURRENT_BINARY_DIR}/release-notes.txt
371 )
372
373 ASCIIDOC2HTML(
374         release-notes.html
375         release-notes.asciidoc
376         asciidoc.conf
377 )
378
379 ASCIIDOC2TXT(
380         release-notes.txt
381         release-notes.asciidoc
382         asciidoc.conf
383 )
384
385 ASCIIDOC2PDF(
386         release-notes-a4.pdf
387         release-notes.asciidoc
388         asciidoc.conf
389         A4
390 )
391
392 ASCIIDOC2PDF(
393         release-notes-us.pdf
394         release-notes.asciidoc
395         asciidoc.conf
396         letter
397 )
398
399 # wsluarm
400 ADD_CUSTOM_COMMAND(
401         OUTPUT
402                 wsluarm
403         COMMAND cmake -E make_directory wsluarm_src
404         COMMAND ${PERL_EXECUTABLE}
405                 ${CMAKE_CURRENT_SOURCE_DIR}/make-wsluarm.pl
406                 ${WSLUA_MODULES}
407         COMMAND
408                 touch wsluarm
409         DEPENDS
410                 ${CMAKE_CURRENT_SOURCE_DIR}/make-wsluarm.pl
411                 ${WSLUA_MODULES}
412 )
413