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(man_out_dir ${CMAKE_CURRENT_BINARY_DIR})
28 file(MAKE_DIRECTORY ${man_out_dir}/man1)
29 file(MAKE_DIRECTORY ${man_out_dir}/man3)
30 file(MAKE_DIRECTORY ${man_out_dir}/man7)
33 ${man_out_dir}/man1/wflinfo.1
34 ${man_out_dir}/man3/waffle_attrib_list.3
35 ${man_out_dir}/man3/waffle_config.3
36 ${man_out_dir}/man3/waffle_context.3
37 ${man_out_dir}/man3/waffle_display.3
38 ${man_out_dir}/man3/waffle_dl.3
39 ${man_out_dir}/man3/waffle_enum.3
40 ${man_out_dir}/man3/waffle_error.3
41 ${man_out_dir}/man3/waffle_gbm.3
42 ${man_out_dir}/man3/waffle_get_proc_address.3
43 ${man_out_dir}/man3/waffle_glx.3
44 ${man_out_dir}/man3/waffle_init.3
45 ${man_out_dir}/man3/waffle_is_extension_in_string.3
46 ${man_out_dir}/man3/waffle_make_current.3
47 ${man_out_dir}/man3/waffle_native.3
48 ${man_out_dir}/man3/waffle_teardown.3
49 ${man_out_dir}/man3/waffle_wayland.3
50 ${man_out_dir}/man3/waffle_window.3
51 ${man_out_dir}/man3/waffle_x11_egl.3
52 ${man_out_dir}/man7/waffle.7
53 ${man_out_dir}/man7/waffle_feature_test_macros.7
56 set(man_common_sources
61 function(waffle_add_manpage vol title)
63 OUTPUT man${vol}/${title}.${vol}
64 DEPENDS ${title}.${vol}.xml ${man_common_sources}
65 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
66 COMMAND ${waffle_xsltproc} -nonet --xinclude -o ${man_out_dir}/man${vol}/ manpage.xsl ${title}.${vol}.xml
70 waffle_add_manpage(1 wflinfo)
71 waffle_add_manpage(3 waffle_attrib_list)
72 waffle_add_manpage(3 waffle_config)
73 waffle_add_manpage(3 waffle_context)
74 waffle_add_manpage(3 waffle_display)
75 waffle_add_manpage(3 waffle_dl)
76 waffle_add_manpage(3 waffle_enum)
77 waffle_add_manpage(3 waffle_error)
78 waffle_add_manpage(3 waffle_gbm)
79 waffle_add_manpage(3 waffle_get_proc_address)
80 waffle_add_manpage(3 waffle_glx)
81 waffle_add_manpage(3 waffle_init)
82 waffle_add_manpage(3 waffle_is_extension_in_string)
83 waffle_add_manpage(3 waffle_make_current)
84 waffle_add_manpage(3 waffle_native)
85 waffle_add_manpage(3 waffle_teardown)
86 waffle_add_manpage(3 waffle_wayland)
87 waffle_add_manpage(3 waffle_window)
88 waffle_add_manpage(3 waffle_x11_egl)
89 waffle_add_manpage(7 waffle)
90 waffle_add_manpage(7 waffle_feature_test_macros)
94 DEPENDS ${man_outputs}
98 DIRECTORY ${man_out_dir}/man1
99 DESTINATION ${CMAKE_INSTALL_MANDIR}
103 DIRECTORY ${man_out_dir}/man3
104 DESTINATION ${CMAKE_INSTALL_MANDIR}
108 DIRECTORY ${man_out_dir}/man7
109 DESTINATION ${CMAKE_INSTALL_MANDIR}