1# Copyright Louis Dionne 2013-2017 2# Distributed under the Boost Software License, Version 1.0. 3# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) 4 5find_package(Doxygen) 6if (NOT DOXYGEN_FOUND) 7 message(WARNING "Doxygen was not found; the 'doc' and 'docset' targets " 8 "will be unavailable.") 9 return() 10endif() 11 12set(HANA_HTML_OUTPUT html) 13set(HANA_GENERATE_DOCSET NO) 14set(HANA_GENERATE_TREEVIEW YES) 15set(HANA_SEARCHENGINE YES) 16configure_file(Doxyfile.in documentation.doxygen @ONLY) 17add_custom_target(doc 18 COMMAND ${CMAKE_COMMAND} -E remove_directory html 19 COMMAND ${DOXYGEN_EXECUTABLE} documentation.doxygen 20 COMMENT "Generating API documentation with Doxygen" 21 VERBATIM 22) 23 24set(HANA_HTML_OUTPUT _docset) 25set(HANA_GENERATE_DOCSET YES) 26set(HANA_GENERATE_TREEVIEW NO) 27set(HANA_SEARCHENGINE NO) 28configure_file(Doxyfile.in docset.doxygen @ONLY) 29add_custom_target(docset 30 COMMAND ${DOXYGEN_EXECUTABLE} docset.doxygen 31 COMMAND ${CMAKE_COMMAND} -E chdir _docset make 32 COMMAND ${CMAKE_COMMAND} -E remove_directory boost.hana.docset 33 COMMAND ${CMAKE_COMMAND} -E copy_directory _docset/boost.hana.docset boost.hana.docset 34 COMMAND ${CMAKE_COMMAND} -E remove_directory _docset 35 COMMENT "Generating documentation Docset" 36 VERBATIM 37) 38