2
# Usage: cmake -D "PROJECT_SOURCE_DIR:PATH=${PROJECT_SOURCE_DIR}"
3
# -D "OUTPUT_FILE:PATH=${PROJECT_BINARY_DIR}/Examples.dox"
4
# -P GenerateExamplesDox.cmake
6
# This cmake script gets a lists of examples for the project and
7
# generates a file suitable for doxygen. The file is a list of
8
# "\examples filename", where doxygen will search for fileanme in it's
9
# example path. Doxygen should then generate an examples page with the
12
# glob the examples for each language
13
file( GLOB_RECURSE EXAMPLES_LIST
14
RELATIVE "${PROJECT_SOURCE_DIR}/Examples"
24
# remove the file before we begin appending
25
file( REMOVE ${OUTPUT_FILE} )
28
file( APPEND ${OUTPUT_FILE} "namespace sitk = itk::simple;/**\n")
30
FOREACH( f IN LISTS EXAMPLES_LIST )
31
file( APPEND ${OUTPUT_FILE} "\\example ${f}\n" )
35
file( APPEND ${OUTPUT_FILE} "*/\n" )