comparison dep/fmt/doc/CMakeLists.txt @ 343:1faa72660932

*: transfer back to cmake from autotools autotools just made lots of things more complicated than they should have and many things broke (i.e. translations)
author Paper <paper@paper.us.eu.org>
date Thu, 20 Jun 2024 05:56:06 -0400
parents
children
comparison
equal deleted inserted replaced
342:adb79bdde329 343:1faa72660932
1 find_program(DOXYGEN doxygen
2 PATHS "$ENV{ProgramFiles}/doxygen/bin"
3 "$ENV{ProgramFiles\(x86\)}/doxygen/bin")
4 if (NOT DOXYGEN)
5 message(STATUS "Target 'doc' disabled (requires doxygen)")
6 return ()
7 endif ()
8
9 # Find the Python interpreter and set the PYTHON_EXECUTABLE variable.
10 if (CMAKE_VERSION VERSION_LESS 3.12)
11 # This logic is deprecated in CMake after 3.12.
12 find_package(PythonInterp QUIET REQUIRED)
13 else ()
14 find_package(Python QUIET REQUIRED)
15 set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
16 endif ()
17
18 add_custom_target(doc
19 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build.py
20 ${FMT_VERSION}
21 SOURCES api.rst syntax.rst usage.rst build.py conf.py _templates/layout.html)
22
23 include(GNUInstallDirs)
24 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
25 DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/fmt OPTIONAL
26 PATTERN ".doctrees" EXCLUDE)