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.

78 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_subdirectory(examples)
  29. add_subdirectory(special_examples)
  30. add_subdirectory(snippets)
  31. add_custom_target(
  32. doc-eigen-prerequisites
  33. ALL
  34. COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/
  35. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_tabs.css
  36. ${CMAKE_CURRENT_BINARY_DIR}/html/
  37. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png
  38. ${CMAKE_CURRENT_BINARY_DIR}/html/
  39. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt
  40. ${CMAKE_CURRENT_BINARY_DIR}/html/
  41. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  42. )
  43. add_custom_target(
  44. doc-unsupported-prerequisites
  45. ALL
  46. COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported
  47. COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/eigendoxy_tabs.css
  48. ${Eigen_BINARY_DIR}/doc/html/unsupported/
  49. COMMAND ${CMAKE_COMMAND} -E copy ${Eigen_SOURCE_DIR}/doc/Eigen_Silly_Professor_64x64.png
  50. ${Eigen_BINARY_DIR}/doc/html/unsupported/
  51. WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc
  52. )
  53. add_dependencies(doc-eigen-prerequisites all_snippets all_examples)
  54. add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples)
  55. add_custom_target(doc ALL
  56. COMMAND doxygen Doxyfile-unsupported
  57. COMMAND doxygen
  58. COMMAND doxygen Doxyfile-unsupported # run doxygen twice to get proper eigen <=> unsupported cross references
  59. COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
  60. COMMAND ${CMAKE_COMMAND} -E tar cvfz eigen-doc/eigen-doc.tgz eigen-doc/*.html eigen-doc/*.map eigen-doc/*.png eigen-doc/*.css eigen-doc/*.js eigen-doc/*.txt eigen-doc/unsupported
  61. COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
  62. WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
  63. add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites)