1project(EigenDoc) 2 3set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE) 4 5project(EigenDoc) 6 7if(CMAKE_COMPILER_IS_GNUCXX) 8 if(CMAKE_SYSTEM_NAME MATCHES Linux) 9 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g1") 10 endif(CMAKE_SYSTEM_NAME MATCHES Linux) 11endif(CMAKE_COMPILER_IS_GNUCXX) 12 13# Set some Doxygen flags 14set(EIGEN_DOXY_PROJECT_NAME "Eigen") 15set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "") 16set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/Eigen\" \"${Eigen_SOURCE_DIR}/doc\"") 17set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "220") 18set(EIGEN_DOXY_TAGFILES "") 19 20configure_file( 21 ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 22 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile 23) 24 25set(EIGEN_DOXY_PROJECT_NAME "Eigen-unsupported") 26set(EIGEN_DOXY_OUTPUT_DIRECTORY_SUFFIX "/unsupported") 27set(EIGEN_DOXY_INPUT "\"${Eigen_SOURCE_DIR}/unsupported/Eigen\" \"${Eigen_SOURCE_DIR}/unsupported/doc\"") 28set(EIGEN_DOXY_HTML_COLORSTYLE_HUE "0") 29# set(EIGEN_DOXY_TAGFILES "\"${Eigen_BINARY_DIR}/doc/eigen.doxytags =../\"") 30set(EIGEN_DOXY_TAGFILES "") 31 32configure_file( 33 ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 34 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-unsupported 35) 36 37configure_file( 38 ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_header.html.in 39 ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_header.html 40) 41 42configure_file( 43 ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_footer.html.in 44 ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_footer.html 45) 46 47configure_file( 48 ${CMAKE_CURRENT_SOURCE_DIR}/eigendoxy_layout.xml.in 49 ${CMAKE_CURRENT_BINARY_DIR}/eigendoxy_layout.xml 50) 51 52configure_file( 53 ${Eigen_SOURCE_DIR}/unsupported/doc/eigendoxy_layout.xml.in 54 ${Eigen_BINARY_DIR}/doc/unsupported/eigendoxy_layout.xml 55) 56 57set(examples_targets "") 58set(snippets_targets "") 59 60add_definitions("-DEIGEN_MAKING_DOCS") 61add_custom_target(all_examples) 62 63add_subdirectory(examples) 64add_subdirectory(special_examples) 65add_subdirectory(snippets) 66 67add_custom_target( 68 doc-eigen-prerequisites 69 ALL 70 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/ 71 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/ 72 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/ 73 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/AsciiQuickReference.txt ${CMAKE_CURRENT_BINARY_DIR}/html/ 74 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 75) 76 77add_custom_target( 78 doc-unsupported-prerequisites 79 ALL 80 COMMAND ${CMAKE_COMMAND} -E make_directory ${Eigen_BINARY_DIR}/doc/html/unsupported 81 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/eigen_navtree_hacks.js ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/ 82 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Eigen_Silly_Professor_64x64.png ${CMAKE_CURRENT_BINARY_DIR}/html/unsupported/ 83 WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc 84) 85 86add_dependencies(doc-eigen-prerequisites all_snippets all_examples) 87add_dependencies(doc-unsupported-prerequisites unsupported_snippets unsupported_examples) 88 89add_custom_target(doc ALL 90 COMMAND doxygen 91 COMMAND doxygen Doxyfile-unsupported 92 COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc 93 COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz 94 COMMAND ${CMAKE_COMMAND} -E tar cfz eigen-doc/eigen-doc.tgz eigen-doc 95 COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html 96 WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc) 97 98add_dependencies(doc doc-eigen-prerequisites doc-unsupported-prerequisites) 99