am7xxx-play: fix runtime warnings from ffmpeg
[libam7xxx.git] / doc / CMakeLists.txt
index ce111b2..6ccf100 100644 (file)
@@ -5,11 +5,21 @@ if(DOXYGEN_FOUND)
 
   add_custom_target(doc
     ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
 
   add_custom_target(doc
     ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
     COMMENT "Generating API documentation with Doxygen" VERBATIM
   )
 
     COMMENT "Generating API documentation with Doxygen" VERBATIM
   )
 
+  add_custom_target(install-doc
+    COMMAND ${CMAKE_COMMAND} -DCOMPONENT=doc -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
+    COMMENT "Installing API documentation")
+  add_dependencies(install-doc doc)
+
+  install(CODE "execute_process(COMMAND ${CMAKE_BUILD_TOOL} doc)")
+
   install(DIRECTORY ${DOC_OUTPUT_PATH}/html
   install(DIRECTORY ${DOC_OUTPUT_PATH}/html
-    DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}")
+    DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}"
+    COMPONENT doc)
 
 endif(DOXYGEN_FOUND)
 
 endif(DOXYGEN_FOUND)
+
+add_subdirectory(man)