Skip to content

Commit 0c8ce73

Browse files
Added install-html target
Closes nexusformat#393
1 parent 3f85cb5 commit 0c8ce73

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ the build system
1919
Building the code on Linux
2020
==========================
2121

22+
2223
Enabling a physical file formats
2324
--------------------------------
2425

doc/doxygen/CMakeLists.txt

+12-4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
if (DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
2828

2929
SET(SOURCES Doxyfile_c Doxyfile_cpp Doxyfile_f90 Doxyfile_f77 preamble.h)
30+
set_directory_properties(PROPERTIES
31+
ADDITIONAL_MAKE_CLEAN_FILES "html-c html-cpp html-f77 html-f90")
3032

3133
foreach(F ${SOURCES})
3234
configure_file(${F} ${F} @ONLY)
@@ -39,7 +41,7 @@ if (DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
3941
)
4042
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-c
4143
DESTINATION ${CMAKE_INSTALL_DOCDIR}/api
42-
COMPONENT Documentation)
44+
COMPONENT html OPTIONAL)
4345

4446
add_dependencies(html html_c_api_doc)
4547

@@ -52,7 +54,7 @@ if (DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
5254

5355
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-cpp
5456
DESTINATION ${CMAKE_INSTALL_DOCDIR}/api
55-
COMPONENT Documentation)
57+
COMPONENT html OPTIONAL)
5658

5759
add_dependencies(html html_cpp_api_doc)
5860
endif()
@@ -82,7 +84,7 @@ if (DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
8284

8385
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-f90
8486
DESTINATION ${CMAKE_INSTALL_DOCDIR}/api
85-
COMPONENT Documentation)
87+
COMPONENT html OPTIONAL)
8688

8789
add_dependencies(html html_f90_api_doc)
8890
endif()
@@ -96,9 +98,15 @@ if (DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
9698

9799
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-f77
98100
DESTINATION ${CMAKE_INSTALL_DOCDIR}/api
99-
COMPONENT Documentation)
101+
COMPONENT html OPTIONAL)
100102
add_dependencies(html html_f77_api_doc)
101103
endif()
102104

105+
add_custom_target(install-html
106+
${CMAKE_COMMAND}
107+
-D "CMAKE_INSTALL_COMPONENT=html"
108+
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake")
109+
add_dependencies(install-html html)
110+
103111
endif (DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
104112

0 commit comments

Comments
 (0)