--- OpenMesh-6.3/Doc/CMakeLists.txt.orig 2016-10-23 20:32:21.999279134 +0200 +++ OpenMesh-6.3/Doc/CMakeLists.txt 2016-10-23 20:34:36.777897182 +0200 @@ -2,14 +2,12 @@ IF (DOXYGEN_FOUND) - # 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() + install(DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html/ + DESTINATION ${ACG_PROJECT_DATADIR}/doc/html + COMPONENT documentation) + add_custom_target(doc-install + COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_COMPONENT=documentation -P ${CMAKE_BINARY_DIR}/cmake_install.cmake + DEPENDS doc + COMMENT "Installing Documentation" VERBATIM ) ENDIF(DOXYGEN_FOUND)