From fd79eba6fcc14adf4f7526f0de9bb83f6230c314 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sun, 7 Jul 2019 16:24:11 -0400 Subject: [PATCH] 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. --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c468ae0..d4e658f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,4 +98,13 @@ add_subdirectory(tests) ################### DOCUMENTATION ################### # Find Doxygen (used for documentation) -include(cmake/Modules/UseDoxygen.cmake) \ No newline at end of file +include(cmake/Modules/UseDoxygen.cmake) + +# Install docs, if the user builds them with `make doc` +install(CODE "MESSAGE(\"Checking for documentation files to install...\")") +install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")") + +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ + DESTINATION ${CMAKE_INSTALL_DOCDIR}/API + MESSAGE_NEVER # Don't spew about file copies + OPTIONAL ) # No error if the docs aren't found