diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -17,6 +17,15 @@ @ONLY ) +# Copy doc from source (if exists) +IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html AND + NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html) + MESSAGE(STATUS "Copy doc from source tree") + EXECUTE_PROCESS( + COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/html ${CMAKE_CURRENT_BINARY_DIR}/html + ) +ENDIF() + IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/) SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)