reflow-oven-control-sw/stm-firmware/doxygen/CMakeLists.txt

41 lines
1.2 KiB
CMake

find_package(Doxygen)
if(NOT WIN32)
string(ASCII 27 Esc)
set(ColorReset "${Esc}[m")
set(ColorBold "${Esc}[1m")
set(Red "${Esc}[31m")
set(Green "${Esc}[32m")
set(Yellow "${Esc}[33m")
set(Blue "${Esc}[34m")
set(Magenta "${Esc}[35m")
set(Cyan "${Esc}[36m")
set(White "${Esc}[37m")
set(BoldRed "${Esc}[1;31m")
set(BoldGreen "${Esc}[1;32m")
set(BoldYellow "${Esc}[1;33m")
set(BoldBlue "${Esc}[1;34m")
set(BoldMagenta "${Esc}[1;35m")
set(BoldCyan "${Esc}[1;36m")
set(BoldWhite "${Esc}[1;37m")
endif()
if (DOXYGEN_FOUND)
add_custom_target(documentation DEPENDS doxygen doxygen-pdf)
add_custom_target(doxygen
COMMAND ./build-doxygen.sh "${PROJECT_BINARY_DIR}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating documentation with Doxygen")
add_custom_target(
doxygen-pdf
COMMAND make
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/latex"
DEPENDS doxygen
)
else (DOXYGEN_FOUND)
message("${BoldMagenta}Doxygen needs to be installed to generate the doxygen documentation${ColorReset}")
message("${BoldMagenta}doxygen, documentation, doxygen-latex targets will not be available${ColorReset}")
endif (DOXYGEN_FOUND)