|
1 | 1 |
|
2 |
| -if(BUILD_DOC) |
3 |
| - find_package(Doxygen REQUIRED) |
4 |
| - |
5 |
| - # set the input and output documentation paths |
6 |
| - set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}) |
7 |
| - set(DOXYGEN_OUTPUT_DIR ${PROJECT_BINARY_DIR}/doxygen) |
8 |
| - |
9 |
| - # configure the source LocalDoxyfile by copying it and replacing all @variables@ |
10 |
| - set(DOXYGEN_CONFIGURED_INPUT ${DOXYGEN_OUTPUT_DIR}/LocalDoxyfile) |
11 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/LocalDoxyfile ${DOXYGEN_CONFIGURED_INPUT} @ONLY) |
12 |
| - |
13 |
| - # copy the files needed by the documentation |
14 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/doxygen.css ${DOXYGEN_OUTPUT_DIR}/doxygen.css COPYONLY) |
15 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/footer_helper.css ${DOXYGEN_OUTPUT_DIR}/footer_helper.css COPYONLY) |
16 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/main_additions.css ${DOXYGEN_OUTPUT_DIR}/main_additions.css COPYONLY) |
17 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/main.css ${DOXYGEN_OUTPUT_DIR}/main.css COPYONLY) |
18 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/footer.php ${DOXYGEN_OUTPUT_DIR}/footer.php COPYONLY) |
19 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/header.php ${DOXYGEN_OUTPUT_DIR}/header.php COPYONLY) |
20 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/footer.html ${DOXYGEN_OUTPUT_DIR}/footer.php COPYONLY) |
21 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/header.html ${DOXYGEN_OUTPUT_DIR}/header.php COPYONLY) |
22 |
| - |
23 |
| - # target setup |
24 |
| - add_custom_target(Doxygen-local ALL |
25 |
| - COMMAND ${CMAKE_COMMAND} -E echo_append "Building Documentation..." |
26 |
| - COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIGURED_INPUT} |
27 |
| - COMMAND ${CMAKE_COMMAND} -E echo "Done." |
28 |
| - WORKING_DIRECTORY ${DOXYGEN_INPUT_DIR}) |
29 |
| - |
30 |
| - # configure the source LocalDoxyfile by copying it and replacing all @variables@ |
31 |
| - set(DOXYGEN_CONFIGURED_INPUT ${DOXYGEN_OUTPUT_DIR}/WebsiteDoxyfile) |
32 |
| - configure_file(${DOXYGEN_INPUT_DIR}/doxygen/WebsiteDoxyfile ${DOXYGEN_CONFIGURED_INPUT} @ONLY) |
33 |
| - |
34 |
| - # target setup |
35 |
| - add_custom_target(Doxygen-website ALL |
36 |
| - COMMAND ${CMAKE_COMMAND} -E echo_append "Building Documentation..." |
37 |
| - COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIGURED_INPUT} |
38 |
| - COMMAND ${CMAKE_COMMAND} -E echo "Done." |
39 |
| - WORKING_DIRECTORY ${DOXYGEN_INPUT_DIR}) |
40 |
| - |
41 |
| - # setup install rules |
42 |
| - install(DIRECTORY ${DOXYGEN_OUTPUT_DIR}/LocalDocumentation |
43 |
| - DESTINATION ${INSTALL_MISC_DIR} |
44 |
| - COMPONENT doxygen) |
45 |
| -endif() |
| 2 | +find_package(Doxygen REQUIRED) |
| 3 | + |
| 4 | +# set the input and output documentation paths |
| 5 | +set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}) |
| 6 | +set(DOXYGEN_OUTPUT_DIR ${PROJECT_BINARY_DIR}/doxygen) |
| 7 | + |
| 8 | +# configure the source LocalDoxyfile by copying it and replacing all @variables@ |
| 9 | +set(DOXYGEN_CONFIGURED_INPUT ${DOXYGEN_OUTPUT_DIR}/LocalDoxyfile) |
| 10 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/LocalDoxyfile ${DOXYGEN_CONFIGURED_INPUT} @ONLY) |
| 11 | + |
| 12 | +# copy the files needed by the documentation |
| 13 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/doxygen.css ${DOXYGEN_OUTPUT_DIR}/doxygen.css COPYONLY) |
| 14 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/footer_helper.css ${DOXYGEN_OUTPUT_DIR}/footer_helper.css COPYONLY) |
| 15 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/main_additions.css ${DOXYGEN_OUTPUT_DIR}/main_additions.css COPYONLY) |
| 16 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/main.css ${DOXYGEN_OUTPUT_DIR}/main.css COPYONLY) |
| 17 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/footer.php ${DOXYGEN_OUTPUT_DIR}/footer.php COPYONLY) |
| 18 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/header.php ${DOXYGEN_OUTPUT_DIR}/header.php COPYONLY) |
| 19 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/footer.html ${DOXYGEN_OUTPUT_DIR}/footer.php COPYONLY) |
| 20 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/header.html ${DOXYGEN_OUTPUT_DIR}/header.php COPYONLY) |
| 21 | + |
| 22 | +# target setup |
| 23 | +add_custom_target(Doxygen-local ALL |
| 24 | + COMMAND ${CMAKE_COMMAND} -E echo_append "Building Documentation..." |
| 25 | + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIGURED_INPUT} |
| 26 | + COMMAND ${CMAKE_COMMAND} -E echo "Done." |
| 27 | + WORKING_DIRECTORY ${DOXYGEN_INPUT_DIR}) |
| 28 | + |
| 29 | +# configure the source LocalDoxyfile by copying it and replacing all @variables@ |
| 30 | +set(DOXYGEN_CONFIGURED_INPUT ${DOXYGEN_OUTPUT_DIR}/WebsiteDoxyfile) |
| 31 | +configure_file(${DOXYGEN_INPUT_DIR}/doxygen/WebsiteDoxyfile ${DOXYGEN_CONFIGURED_INPUT} @ONLY) |
| 32 | + |
| 33 | +# target setup |
| 34 | +add_custom_target(Doxygen-website ALL |
| 35 | + COMMAND ${CMAKE_COMMAND} -E echo_append "Building Documentation..." |
| 36 | + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIGURED_INPUT} |
| 37 | + COMMAND ${CMAKE_COMMAND} -E echo "Done." |
| 38 | + WORKING_DIRECTORY ${DOXYGEN_INPUT_DIR}) |
| 39 | + |
| 40 | +# setup install rules |
| 41 | +install(DIRECTORY ${DOXYGEN_OUTPUT_DIR}/LocalDocumentation |
| 42 | + DESTINATION ${INSTALL_MISC_DIR} |
| 43 | + COMPONENT doxygen) |
0 commit comments