CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. subdirs(Doxygen)
  4. if(CMAKE_DOC_TARBALL)
  5. # Undocumented option to extract and install pre-built documentation.
  6. # This is intended for use during packaging of CMake itself.
  7. if(CMAKE_DOC_TARBALL MATCHES "/([^/]+)\\.tar\\.gz$")
  8. set(dir "${CMAKE_MATCH_1}")
  9. else()
  10. message(FATAL_ERROR "CMAKE_DOC_TARBALL must end in .tar.gz")
  11. endif()
  12. add_custom_command(
  13. OUTPUT ${dir}.stamp
  14. COMMAND cmake -E remove_directory ${dir}
  15. COMMAND cmake -E tar xf ${CMAKE_DOC_TARBALL}
  16. COMMAND cmake -E touch ${dir}.stamp
  17. DEPENDS ${CMAKE_DOC_TARBALL}
  18. )
  19. add_custom_target(documentation ALL DEPENDS ${dir}.stamp)
  20. install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir}/
  21. DESTINATION . USE_SOURCE_PERMISSIONS)
  22. else()
  23. # Normal documentation build.
  24. add_subdirectory(Sphinx)
  25. endif()
  26. if(WIX_CUSTOM_ACTION_ENABLED)
  27. add_subdirectory(Release/WiX)
  28. endif()
  29. # Make sure generated files use the same clang-tidy checks (none).
  30. configure_file(.clang-tidy .clang-tidy COPYONLY)