find_package(Doxygen) if(DOXYGEN_FOUND) configure_file(Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY) add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMENT "Generate API documentation with Doxygen" VERBATIM) endif()