You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.8 KiB

  1. project(EigenDoc)
  2. set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)
  3. project(EigenDoc)
  4. if(CMAKE_COMPILER_IS_GNUCXX)
  5. if(CMAKE_SYSTEM_NAME MATCHES Linux)
  6. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g1")
  7. endif(CMAKE_SYSTEM_NAME MATCHES Linux)
  8. endif(CMAKE_COMPILER_IS_GNUCXX)
  9. configure_file(
  10. ${Eigen_SOURCE_DIR}/unsupported/doc/Doxyfile.in
  11. ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported
  12. )
  13. configure_file(
  14. ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
  15. ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
  16. )
  17. configure_file(
  18. ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in
  19. ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html
  20. )
  21. configure_file(
  22. ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in
  23. ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html
  24. )
  25. set(examples_targets "")
  26. set(snippets_targets "")
  27. add_definitions("-DEIGEN_MAKING_DOCS")
  28. add_custom_target(all_examples)
  29. add_subdirectory(examples)
  30. add_subdirectory(special_examples)
  31. add_subdirectory(snippets)
  32. add_custom_target(
  33. doc-eigen-prerequisites
  34. ALL
  35. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/
  36. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_tabs.css
  37. ${CMAKE_CURRENT_BINARY_DIR}/html/
  38. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png
  39. ${CMAKE_CURRENT_BINARY_DIR}/html/
  40. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt
  41. ${CMAKE_CURRENT_BINARY_DIR}/html/
  42. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  43. )
  44. add_custom_target(
  45. doc-unsupported-prerequisites
  46. ALL
  47. COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported
  48. COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/eigendoxy_tabs.css
  49. ${Eigen_BINARY_DIR}/doc/html/unsupported/
  50. COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/Eigen_Silly_Professor_64x64.png
  51. ${Eigen_BINARY_DIR}/doc/html/unsupported/
  52. WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc
  53. )
  54. add_dependencies(doc-eigen-prerequisites all_snippets all_examples)
  55. add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples)
  56. add_custom_target(doc ALL
  57. COMMAND doxygen Doxyfile-unsupported
  58. COMMAND doxygen
  59. COMMAND doxygen Doxyfile-unsupported # run doxygen twice to get proper eigen <=> unsupported cross references
  60. COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
  61. COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz
  62. COMMAND ${CMAKE_COMMAND} -E tar cvfz eigen-doc/eigen-doc.tgz eigen-doc
  63. COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
  64. WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
  65. add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)