1 # Copyright 2012 Intel Corporation
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are met:
8 # - Redistributions of source code must retain the above copyright notice, this
9 # list of conditions and the following disclaimer.
11 # - Redistributions in binary form must reproduce the above copyright notice,
12 # this list of conditions and the following disclaimer in the documentation
13 # and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 set(html_out_dir ${CMAKE_BINARY_DIR}/doc/html/man)
28 file(MAKE_DIRECTORY ${html_out_dir})
31 ${html_out_dir}/wflinfo.1.html
32 ${html_out_dir}/waffle_attrib_list.3.html
33 ${html_out_dir}/waffle_config.3.html
34 ${html_out_dir}/waffle_context.3.html
35 ${html_out_dir}/waffle_display.3.html
36 ${html_out_dir}/waffle_dl.3.html
37 ${html_out_dir}/waffle_enum.3.html
38 ${html_out_dir}/waffle_error.3.html
39 ${html_out_dir}/waffle_gbm.3.html
40 ${html_out_dir}/waffle_get_proc_address.3.html
41 ${html_out_dir}/waffle_glx.3.html
42 ${html_out_dir}/waffle_init.3.html
43 ${html_out_dir}/waffle_is_extension_in_string.3.html
44 ${html_out_dir}/waffle_make_current.3.html
45 ${html_out_dir}/waffle_native.3.html
46 ${html_out_dir}/waffle_teardown.3.html
47 ${html_out_dir}/waffle_wayland.3.html
48 ${html_out_dir}/waffle_window.3.html
49 ${html_out_dir}/waffle_x11_egl.3.html
50 ${html_out_dir}/waffle.7.html
51 ${html_out_dir}/waffle_feature_test_macros.7.html
54 set(html_common_sources
59 function(waffle_add_html vol title)
60 set(output ${html_out_dir}/${title}.${vol}.html)
61 set(main_input ${title}.${vol}.xml)
64 DEPENDS ${main_input} ${html_common_sources}
65 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
66 COMMAND ${waffle_xsltproc} -nonet --xinclude -o ${output} html.xsl ${main_input}
70 waffle_add_html(1 wflinfo)
71 waffle_add_html(3 waffle_attrib_list)
72 waffle_add_html(3 waffle_config)
73 waffle_add_html(3 waffle_context)
74 waffle_add_html(3 waffle_display)
75 waffle_add_html(3 waffle_dl)
76 waffle_add_html(3 waffle_enum)
77 waffle_add_html(3 waffle_error)
78 waffle_add_html(3 waffle_gbm)
79 waffle_add_html(3 waffle_get_proc_address)
80 waffle_add_html(3 waffle_glx)
81 waffle_add_html(3 waffle_init)
82 waffle_add_html(3 waffle_is_extension_in_string)
83 waffle_add_html(3 waffle_make_current)
84 waffle_add_html(3 waffle_native)
85 waffle_add_html(3 waffle_teardown)
86 waffle_add_html(3 waffle_wayland)
87 waffle_add_html(3 waffle_window)
88 waffle_add_html(3 waffle_x11_egl)
89 waffle_add_html(7 waffle)
90 waffle_add_html(7 waffle_feature_test_macros)
92 add_custom_target(html
94 DEPENDS ${html_outputs}
98 DIRECTORY ${html_out_dir}
99 DESTINATION ${CMAKE_INSTALL_DOCDIR}/html