-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable CMake install of api docs from tarball w/o doxygen
- Loading branch information
Showing
1 changed file
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
|
||
find_package(Doxygen) | ||
option(BUILD_DOXYGEN "Enable API documentation building via Doxygen if not already present" ON) | ||
|
||
if (NOT DOXYGEN_FOUND) | ||
return() | ||
endif() | ||
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/api") | ||
|
||
option(BUILD_DOXYGEN "Enable API documentation building via Doxygen" ON) | ||
find_package(Doxygen) | ||
|
||
if (NOT BUILD_DOXYGEN) | ||
return() | ||
endif() | ||
if (NOT DOXYGEN_FOUND) | ||
return() | ||
endif() | ||
|
||
set(top_srcdir "${PROJECT_SOURCE_DIR}") | ||
configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) | ||
if (NOT BUILD_DOXYGEN) | ||
return() | ||
endif() | ||
|
||
set(top_srcdir "${PROJECT_SOURCE_DIR}") | ||
configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) | ||
|
||
add_custom_target(FLAC-doxygen ALL | ||
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMENT "Generating API documentation with Doxygen" | ||
VERBATIM ) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doxytmp/html/" | ||
DESTINATION "${CMAKE_INSTALL_DOCDIR}/api") | ||
add_custom_target(FLAC-doxygen ALL | ||
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMENT "Generating API documentation with Doxygen" | ||
VERBATIM ) | ||
|
||
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() |