CMakeLists.txt 1019 B

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8; mode: cmake -*-
  2. # Cmake file for ra-ra/docs
  3. # (c) Daniel Llorens - 2018-2024
  4. # This library is free software; you can redistribute it and/or modify it under
  5. # the terms of the GNU Lesser General Public License as published by the Free
  6. # Software Foundation; either version 3 of the License, or (at your option) any
  7. # later version.
  8. cmake_minimum_required (VERSION 3.5)
  9. project (ra-docs)
  10. if (NOT "$ENV{MAKEINFO}" STREQUAL "")
  11. set(MAKEINFO_EXECUTABLE "$ENV{MAKEINFO}" CACHE INTERNAL "Copied from environment variable")
  12. else()
  13. find_program(MAKEINFO_EXECUTABLE makeinfo)
  14. endif()
  15. message ("Using makeinfo : ${MAKEINFO_EXECUTABLE}")
  16. set (man_in ${CMAKE_CURRENT_SOURCE_DIR}/ra-ra.texi)
  17. set (man_out ${CMAKE_CURRENT_BINARY_DIR}/index.html)
  18. add_custom_command (OUTPUT ${man_out}
  19. COMMAND ${MAKEINFO_EXECUTABLE} --html --no-split ${man_in} -o ${man_out} -c HTML_MATH=mathjax
  20. DEPENDS ${man_in}
  21. COMMENT "Creating HTML file ${man_out}"
  22. VERBATIM)
  23. add_custom_target (docs ALL DEPENDS ${man_out})