CMakeLists.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #=============================================================================
  2. # CMake - Cross Platform Makefile Generator
  3. # Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. #
  5. # Distributed under the OSI-approved BSD License (the "License");
  6. # see accompanying file Copyright.txt for details.
  7. #
  8. # This software is distributed WITHOUT ANY WARRANTY; without even the
  9. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. # See the License for more information.
  11. #=============================================================================
  12. subdirs(Doxygen KWStyle)
  13. if(CMAKE_DOC_TARBALL)
  14. # Undocumented option to extract and install pre-built documentation.
  15. # This is intended for use during packaging of CMake itself.
  16. if(CMAKE_DOC_TARBALL MATCHES "/([^/]+)\\.tar\\.gz$")
  17. set(dir "${CMAKE_MATCH_1}")
  18. else()
  19. message(FATAL_ERROR "CMAKE_DOC_TARBALL must end in .tar.gz")
  20. endif()
  21. add_custom_command(
  22. OUTPUT ${dir}.stamp
  23. COMMAND cmake -E remove_directory ${dir}
  24. COMMAND cmake -E tar xf ${CMAKE_DOC_TARBALL}
  25. COMMAND cmake -E touch ${dir}.stamp
  26. DEPENDS ${CMAKE_DOC_TARBALL}
  27. )
  28. add_custom_target(documentation ALL DEPENDS ${dir}.stamp)
  29. install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir}/
  30. DESTINATION . USE_SOURCE_PERMISSIONS)
  31. else()
  32. # Normal documentation build.
  33. add_subdirectory(Sphinx)
  34. endif()
  35. if(WIX_CUSTOM_ACTION_ENABLED)
  36. add_subdirectory(Release/WiX)
  37. endif()