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.

98 lines
3.5 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. # Set some Doxygen flags
  10. set(EIGEN_DOXY_PROJECT_NAME "Eigen")
  11. set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "")
  12. set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/Eigen\" \"${Eigen_SOURCE_DIR}/doc\"")
  13. set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "220")
  14. set(EIGEN_DOXY_TAGFILES "")
  15. configure_file(
  16. ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
  17. ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
  18. )
  19. set(EIGEN_DOXY_PROJECT_NAME "Eigen-unsupported")
  20. set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "/unsupported")
  21. set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/unsupported/Eigen\" \"${Eigen_SOURCE_DIR}/unsupported/doc\"")
  22. set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "0")
  23. # set(EIGEN_DOXY_TAGFILES "\"${Eigen_BINARY_DIR}/doc/eigen.doxytags =../\"")
  24. set(EIGEN_DOXY_TAGFILES "")
  25. configure_file(
  26. ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
  27. ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported
  28. )
  29. configure_file(
  30. ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in
  31. ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html
  32. )
  33. configure_file(
  34. ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in
  35. ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html
  36. )
  37. configure_file(
  38. ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_layout.xml.in
  39. ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_layout.xml
  40. )
  41. configure_file(
  42. ${Eigen_SOURCE_DIR}/unsupported/doc/eigendoxy_layout.xml.in
  43. ${Eigen_BINARY_DIR}/doc/unsupported/eigendoxy_layout.xml
  44. )
  45. set(examples_targets "")
  46. set(snippets_targets "")
  47. add_definitions("-DEIGEN_MAKING_DOCS")
  48. add_custom_target(all_examples)
  49. add_subdirectory(examples)
  50. add_subdirectory(special_examples)
  51. add_subdirectory(snippets)
  52. add_custom_target(
  53. doc-eigen-prerequisites
  54. ALL
  55. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/
  56. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/
  57. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/
  58. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt ${CMAKE_CURRENT_BINARY_DIR}/html/
  59. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  60. )
  61. add_custom_target(
  62. doc-unsupported-prerequisites
  63. ALL
  64. COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported
  65. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
  66. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/
  67. WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc
  68. )
  69. add_dependencies(doc-eigen-prerequisites all_snippets all_examples)
  70. add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples)
  71. add_custom_target(doc ALL
  72. COMMAND doxygen
  73. COMMAND doxygen Doxyfile-unsupported
  74. COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
  75. COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz
  76. COMMAND ${CMAKE_COMMAND} -E tar cfz eigen-doc/eigen-doc.tgz eigen-doc
  77. COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
  78. WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
  79. add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)