Skip to content

Commit 25dab11

Browse files
authored
Merge pull request #268 from ferdnyc/doc-install
Install documentation into DOCDIR/API, if built
2 parents e4d622e + fd79eba commit 25dab11

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,13 @@ add_subdirectory(tests)
9898

9999
################### DOCUMENTATION ###################
100100
# Find Doxygen (used for documentation)
101-
include(cmake/Modules/UseDoxygen.cmake)
101+
include(cmake/Modules/UseDoxygen.cmake)
102+
103+
# Install docs, if the user builds them with `make doc`
104+
install(CODE "MESSAGE(\"Checking for documentation files to install...\")")
105+
install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")")
106+
107+
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/
108+
DESTINATION ${CMAKE_INSTALL_DOCDIR}/API
109+
MESSAGE_NEVER # Don't spew about file copies
110+
OPTIONAL ) # No error if the docs aren't found

0 commit comments

Comments
 (0)