Commit 9ff1ab6f authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

Doc. Use full image list dependancies.

parent 87bc7467
......@@ -5,22 +5,28 @@ set(DOCUMENTATION_IMAGE_DIR ${PROJECT_SOURCE_DIR}/doc/source/images)
set(PYLENE_IMAGE_DIR ${PROJECT_SOURCE_DIR}/img)
set(DOCUMENTATION_IMAGES "")
function(add_image EXECUTABLE INPUT OUTPUT)
set(OUTPUT ${DOCUMENTATION_IMAGE_DIR}/${OUTPUT})
list(APPEND DOCUMENTATION_IMAGES ${OUTPUT})
function(add_image EXECUTABLE INPUT)
# add_image(EXECUTABLE INPUT OUTPUT1 [ [OUTPUT2 [OUTPUT3 ...] ] ]
set(outputs "")
foreach(output IN LISTS ARGN)
set(output "${DOCUMENTATION_IMAGE_DIR}/${output}")
list(APPEND outputs "${output}")
list(APPEND DOCUMENTATION_IMAGES "${output}")
endforeach()
set(DOCUMENTATION_IMAGES ${DOCUMENTATION_IMAGES} PARENT_SCOPE)
add_custom_command(OUTPUT ${OUTPUT}
COMMAND ${EXECUTABLE} ${INPUT} ${OUTPUT} ${ARGN}
add_custom_command(OUTPUT ${outputs}
COMMAND ${EXECUTABLE} ${INPUT} ${outputs}
COMMAND_EXPAND_LISTS
WORKING_DIRECTORY ${DOCUMENTATION_IMAGE_DIR})
)
endfunction()
add_image("erosion-cli;erosion;square;21" ${PYLENE_IMAGE_DIR}/lena.pgm morpho_erosion_1.png)
add_image("erosion-cli;dilation;square;21" ${PYLENE_IMAGE_DIR}/lena.pgm morpho_dilation_1.png)
add_image("erosion-cli;opening;square;21" ${PYLENE_IMAGE_DIR}/lena.pgm morpho_opening_1.png)
add_image("erosion-cli;closing;square;21" ${PYLENE_IMAGE_DIR}/lena.pgm morpho_closing_1.png)
add_image("staff_lines" ${DOCUMENTATION_IMAGE_DIR}/staff_lines.pbm
add_image("erosion-cli;erosion;square;21" "${PYLENE_IMAGE_DIR}/lena.pgm" morpho_erosion_1.png)
add_image("erosion-cli;dilation;square;21" "${PYLENE_IMAGE_DIR}/lena.pgm" morpho_dilation_1.png)
add_image("erosion-cli;opening;square;21" "${PYLENE_IMAGE_DIR}/lena.pgm" morpho_opening_1.png)
add_image("erosion-cli;closing;square;21" "${PYLENE_IMAGE_DIR}/lena.pgm" morpho_closing_1.png)
add_image("staff_lines" "${DOCUMENTATION_IMAGE_DIR}/staff_lines.pbm"
morpho_hitormiss_1.png morpho_hitormiss_2.png staff_lines_markers.png morpho_reconstruction_1.png morpho_reconstruction_2.png)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment