CMakeLists.txt 735 B

123456789101112131415161718192021222324
  1. # -*- coding: utf-8; mode: cmake -*-
  2. # (c) Daniel Llorens - 2018-2019
  3. cmake_minimum_required (VERSION 3.5)
  4. project (ra-docs)
  5. if (NOT "$ENV{MAKEINFO}" STREQUAL "")
  6. set(MAKEINFO_EXECUTABLE "$ENV{MAKEINFO}" CACHE INTERNAL "Copied from environment variable")
  7. else()
  8. find_program(MAKEINFO_EXECUTABLE makeinfo)
  9. endif()
  10. message ("Using makeinfo : ${MAKEINFO_EXECUTABLE}")
  11. set (man_in ${CMAKE_CURRENT_SOURCE_DIR}/ra-ra.texi)
  12. set (man_out ${CMAKE_CURRENT_BINARY_DIR}/index.html)
  13. add_custom_command (OUTPUT ${man_out}
  14. COMMAND ${MAKEINFO_EXECUTABLE} --html --no-split ${man_in} -o ${man_out} -c HTML_MATH=mathjax
  15. DEPENDS ${man_in}
  16. COMMENT "Creating HTML file ${man_out}"
  17. VERBATIM)
  18. add_custom_target (docs ALL DEPENDS ${man_out})