CMake: bump the minimal required version to 3.5
[libftdi] / doc / CMakeLists.txt
1 find_package ( Doxygen REQUIRED )
2
3 # Copy doxy.config.in
4 configure_file(
5   ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
6   ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
7 )
8
9 configure_file(
10   ${PROJECT_SOURCE_DIR}/doc/Doxyfile.xml.in
11   ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.xml
12 )
13
14 # Run doxygen
15 add_custom_command(
16   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
17   COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
18   COMMENT "Generating API documentation"
19   DEPENDS ${c_headers};${c_sources};${cpp_sources};${cpp_headers}
20 )
21
22 add_custom_target(
23   docs ALL
24   COMMENT "Documentation target docs"
25   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
26 )