forked from JCSDA/oops
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
23 lines (20 loc) · 951 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
23 lines (20 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
find_package(Doxygen)
if(DOXYGEN_FOUND)
message(STATUS "Build OOPS Documentation")
include(GNUInstallDirs)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
# note the option ALL which allows to build the docs together with the application
add_custom_target( doc_doxygen_oops ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating OOPS documentation with Doxygen"
VERBATIM )
set( HTML_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/html )
install(DIRECTORY ${HTML_BUILD_DIR} DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/doc COMPONENT Documentation)
else()
message(WARNING "Build OOPS Documentation failure to find Doxygen")
endif()