Skip to content

Commit f8ddcd8

Browse files
committed
Add install option for ROBODoc generated documentation
1 parent b277d20 commit f8ddcd8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ if ( NOT SKIP_DOC_GEN )
170170
COMMENT "Building HTML documentation for ${CMAKE_PROJECT_NAME} using ROBODoc" )
171171
add_custom_target ( documentation ALL
172172
DEPENDS ${ROBODOC_OUTPUTS} )
173+
set ( INSTALL_API_DOCUMENTATION TRUE
174+
CACHE BOOL "Install ROBODoc generated documentation?" )
175+
if ( INSTALL_API_DOCUMENTATION )
176+
if ( USE_GNU_INSTALL_CONVENTION )
177+
install ( DIRECTORY "${DOC_DIR}/" DESTINATION "${CMAKE_INSTALL_DOCDIR}" )
178+
else ()
179+
install ( DIRECTORY "${DOC_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/${PACKAGE_VERSION}/doc" )
180+
endif ()
181+
endif ()
173182
else () # Not found
174183
message ( WARNING
175184
"ROBODoc not found! Please set the CMake cache variable ROBODOC to point to the installed ROBODoc binary, and reconfigure or disable building the documentation. ROBODoc can be installed from: http://www.xs4all.nl/~rfsber/Robo/ If you do not wish to install ROBODoc and build the json-fortran documentation, then please set the CMake cache variable SKIP_DOC_GEN to TRUE." )

0 commit comments

Comments
 (0)