Enable CMake install of api docs from tarball w/o doxygen

This commit is contained in:
Martijn van Beurden 2024-05-02 09:17:12 +02:00
parent d21202e3f2
commit d6204ea911
1 changed files with 28 additions and 22 deletions

View File

@ -1,13 +1,15 @@
cmake_minimum_required(VERSION 3.9)
option(BUILD_DOXYGEN "Enable API documentation building via Doxygen if not already present" ON)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/api")
find_package(Doxygen)
if (NOT DOXYGEN_FOUND)
return()
endif()
option(BUILD_DOXYGEN "Enable API documentation building via Doxygen" ON)
if (NOT BUILD_DOXYGEN)
return()
endif()
@ -24,3 +26,7 @@ add_custom_target(FLAC-doxygen ALL
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doxytmp/html/"
DESTINATION "${CMAKE_INSTALL_DOCDIR}/api")
else()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/api/"
DESTINATION "${CMAKE_INSTALL_DOCDIR}/api")
endif()