d6e487663c3fbed21482aa13f8992058b14ff719
[blender.git] / intern / cycles / doc / CMakeLists.txt
1
2 INSTALL(DIRECTORY license DESTINATION ${CYCLES_INSTALL_PATH}/cycles PATTERN ".svn" EXCLUDE)
3
4 SET(doc_sources
5         index.html
6
7         development/build.html
8         development/bvh.html
9         development/design.html
10         development/device_abstraction.html
11         development/displacement.html
12         development/feature_todo.html
13         development/known_issues.html
14         development/geometric_issues.html
15         development/ideas.html
16         development/index.html
17         development/kernel.html
18         development/license.html
19         development/node_guidelines.html
20         development/optimization.html
21         development/osl_gpu.html
22         development/papers.html
23         development/sobol.html
24         development/source.html
25         development/subdivision.html
26         development/threads.html
27         development/units_colors.html
28
29         reference/camera.html
30         reference/curve.html
31         reference/devices.html
32         reference/film.html
33         reference/index.html
34         reference/integrator.html
35         reference/interactive.html
36         reference/lamp.html
37         reference/mesh.html
38         reference/motion_blur.html
39         reference/particle.html
40         reference/subdivision.html
41         reference/world.html
42
43         reference/material/displacement.html
44         reference/material/index.html
45         reference/material/surface.html
46         reference/material/volume.html
47
48         reference/shader/background.html
49         reference/shader/bsdf.html
50         reference/shader/color_operations.html
51         reference/shader/custom.html
52         reference/shader/emission.html
53         reference/shader/image_textures.html
54         reference/shader/index.html
55         reference/shader/input.html
56         reference/shader/output.html
57         reference/shader/procedural_textures.html
58         reference/shader/vector_operations.html
59         reference/shader/volume.html
60         reference/shader/volume_textures.html)
61
62 SET(doc_extra
63         development/images/rng_lcg_50_pass.png
64         development/images/rng_sobol_50_pass.png
65         development/threads.svg
66         reference/camera_ortho.svg
67         reference/camera_persp.svg
68         reference/material/material.svg
69         reference/shader/bsdf.svg
70         style/style.css)
71
72 SET(doc_templates
73         templates/development.html
74         templates/footer.html
75         templates/header.html
76         templates/nodes.html
77         templates/reference.html)
78
79 IF(WITH_CYCLES_DOCS)
80         MACRO(install_doc_file source_file html_file)
81                 GET_FILENAME_COMPONENT(subdir ${source_file} PATH)
82                 INSTALL(
83                         FILES ${html_file}
84                         DESTINATION ${CYCLES_INSTALL_PATH}/cycles/doc/${subdir})
85         ENDMACRO()
86
87         FOREACH(_file ${doc_sources})
88                 SET(source_file ${_file})
89                 SET(html_file ${CMAKE_CURRENT_BINARY_DIR}/${_file})
90                 ADD_CUSTOM_COMMAND(
91                         OUTPUT ${html_file} 
92                         COMMAND python generate.py ${source_file} ${html_file} ${CYCLES_VERSION}
93                         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
94                         DEPENDS ${source_file} ${doc_templates} generate.py)
95                 LIST(APPEND html_files ${html_file})
96                 install_doc_file(${source_file} ${html_file})
97         ENDFOREACH()
98
99         FOREACH(_file ${doc_extra})
100                 install_doc_file(${_file} ${_file})
101         ENDFOREACH()
102
103         ADD_CUSTOM_TARGET(cycles_doc ALL DEPENDS ${html_files})
104 ENDIF()
105