diff --git a/Doc/CMakeLists.txt b/Doc/CMakeLists.txt index f656a095..bd7c5312 100644 --- a/Doc/CMakeLists.txt +++ b/Doc/CMakeLists.txt @@ -4,6 +4,12 @@ if (TARGET doc) acg_copy_after_build (doc "${CMAKE_CURRENT_SOURCE_DIR}/html" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html") endif () -#install(DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html -# DESTINATION share/doc/OpenMesh -# ) +# Add a documentation install target +add_custom_target(doc-install COMMENT "Installing Documentation" VERBATIM ) + +# Build Documentation before installing it +add_dependencies(doc-install doc) + +if (TARGET doc-install) + acg_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_DATADIR}/doc/html") +endif()