doc/CMakeLists.txt
changeset 867 994c7df296c9
parent 723 01d301395d03
child 791 f8c468367dab
child 1033 16d466589b54
     1.1 --- a/doc/CMakeLists.txt	Fri Nov 13 12:33:33 2009 +0100
     1.2 +++ b/doc/CMakeLists.txt	Thu Dec 10 17:05:35 2009 +0100
     1.3 @@ -1,42 +1,51 @@
     1.4  SET(PACKAGE_NAME ${PROJECT_NAME})
     1.5  SET(PACKAGE_VERSION ${PROJECT_VERSION})
     1.6 -SET(abs_top_srcdir ${CMAKE_SOURCE_DIR})
     1.7 -SET(abs_top_builddir ${CMAKE_BINARY_DIR})
     1.8 +SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
     1.9 +SET(abs_top_builddir ${PROJECT_BINARY_DIR})
    1.10  
    1.11  CONFIGURE_FILE(
    1.12 -  ${CMAKE_SOURCE_DIR}/doc/Doxyfile.in
    1.13 -  ${CMAKE_BINARY_DIR}/doc/Doxyfile
    1.14 -  @ONLY)
    1.15 +  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
    1.16 +  ${PROJECT_BINARY_DIR}/doc/Doxyfile
    1.17 +  @ONLY
    1.18 +)
    1.19  
    1.20  IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
    1.21    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
    1.22 +  SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)
    1.23 +  ADD_CUSTOM_TARGET(html
    1.24 +    COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images
    1.25 +    COMMAND ${CMAKE_COMMAND} -E make_directory gen-images
    1.26 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
    1.27 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
    1.28 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
    1.29 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
    1.30 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
    1.31 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
    1.32 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
    1.33 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
    1.34 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
    1.35 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
    1.36 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
    1.37 +    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
    1.38 +    COMMAND ${CMAKE_COMMAND} -E remove_directory html
    1.39 +    COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    1.40 +    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    1.41 +  )
    1.42 +
    1.43 +  SET_TARGET_PROPERTIES(html PROPERTIES PROJECT_LABEL BUILD_DOC)
    1.44 +
    1.45    IF(UNIX)
    1.46 -    ADD_CUSTOM_TARGET(html
    1.47 -      COMMAND rm -rf gen-images
    1.48 -      COMMAND mkdir gen-images
    1.49 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
    1.50 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
    1.51 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
    1.52 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
    1.53 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
    1.54 -      COMMAND rm -rf html
    1.55 -      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    1.56 -      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
    1.57 +    INSTALL(
    1.58 +      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
    1.59 +      DESTINATION share/doc/lemon/html
    1.60 +      COMPONENT html_documentation
    1.61 +    )
    1.62    ELSEIF(WIN32)
    1.63 -    ADD_CUSTOM_TARGET(html
    1.64 -      COMMAND if exist gen-images rmdir /s /q gen-images
    1.65 -      COMMAND mkdir gen-images
    1.66 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
    1.67 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
    1.68 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
    1.69 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
    1.70 -      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
    1.71 -      COMMAND if exist html rmdir /s /q html
    1.72 -      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    1.73 -      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
    1.74 -  ENDIF(UNIX)
    1.75 -  INSTALL(
    1.76 -    DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
    1.77 -    DESTINATION share/doc
    1.78 -    COMPONENT html_documentation)
    1.79 -ENDIF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
    1.80 +    INSTALL(
    1.81 +      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
    1.82 +      DESTINATION doc
    1.83 +      COMPONENT html_documentation
    1.84 +    )
    1.85 +  ENDIF()
    1.86 +
    1.87 +ENDIF()