Skip to content

Commit fd79eba

Browse files
committed
Install docs in DOCDIR/API, if built
Running `make install` AFTER `make doc` will pick up the generated Doxygen output an install it into `${CMAKE_INSTALL_DOCDIR}/API`, which is `${CMAKE_INSTALL_PREFIX}/share/doc/libopenshot/API` on most systems.
1 parent 1b19ae7 commit fd79eba

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)