##################################################### # # This is the root IGSTKTheBook CMakeLists file. # ##################################################### # # To Build the IGSTK Book # # Compile and build the IGSTK binaries. You will need to build the Examples in # the Sandbox module. # # Run this CMakeLists.txt file and set BUILD_FIGURES 'ON'. Specify the # directory containing the IGSTK executables. Specify IGSTK data paths. # The default data path inferred is IGSTKSanbox/Examples/Data. This should suffice # for building the IGSTKTheBook. Should more paths be need add them in a colon # seperated list. # # Make # Make # # More than one make may be necessary to ensure generation of the index # # If BUILD_FIGURES is set to ON, the examples source files are parsed for # command line argument tags and if found executed to generate output # images, if not the images are expected to be present in the Art/ folder # in PNG/XFIG/JPEG/EPS format. # # Since generating figures may take a while, you may set BUILD_FIGURES to # OFF. In this case, all figures are expected to be present in the Art/ # folder in PNG/XFIG/JPEG/EPS format. # # CMAKE_MINIMUM_REQUIRED(VERSION 1.6) PROJECT(IGSTKTheBook C) # # File that defines the path to .cxx examples in IGSTK sources # CONFIGURE_FILE( ${IGSTKTheBook_SOURCE_DIR}/IGSTKTheBookConfiguration.tex.in ${IGSTKTheBook_BINARY_DIR}/IGSTKTheBookConfiguration.tex IMMEDIATE ) # Find IGSTK Sources FIND_PATH(IGSTK_SOURCE_DIR UseIGSTK.cmake.in ../IGSTK ../../IGSTK ../../../IGSTK ../../../../IGSTK ../../../../../IGSTK ../../../../../../IGSTK ) # Find IGSTK Sandbox Sources FIND_PATH(IGSTKSandbox_SOURCE_DIR igstkSandboxConfigure.h.in ${IGSTK_SOURCE_DIR}/../Sandbox ${IGSTK_SOURCE_DIR}/../IGSTKSandbox ) IF( NOT IGSTKSandbox_SOURCE_DIR ) MESSAGE(FATAL_ERROR "IGSTK Sandbox source directory is not set") ENDIF( NOT IGSTKSandbox_SOURCE_DIR ) IF( NOT IGSTK_SOURCE_DIR ) MESSAGE(FATAL_ERROR "IGSTK source directory is not set") ENDIF( NOT IGSTK_SOURCE_DIR ) # IGSTK_DATA_PATHS is searched recursively.. you need not enter sub-directories SET(IGSTK_DATA_PATHS "${IGSTK_SOURCE_DIR}/Examples/Data" CACHE STRING "Where the IGSTK data is. Enter a colon seperated list.") # # Rebuild the Software Guide figures or not ? SET(BUILD_FIGURES ON CACHE BOOL "Build Software Guide figures") IF( BUILD_FIGURES ) SET(IGSTK_EXECUTABLES_DIR "" CACHE PATH "Where the IGSTK examples executables are") SET(RUN_EXAMPLES_SCRIPT "${IGSTKTheBook_SOURCE_DIR}/Examples/RunExamples.pl" CACHE FILEPATH "Where the RunExamples Script is") ENDIF( BUILD_FIGURES ) # # Find ImageMagick tools # This is used to convert image formats # INCLUDE (${CMAKE_ROOT}/Modules/FindImageMagick.cmake) IF(NOT IMAGEMAGICK_CONVERT_EXECUTABLE) MESSAGE("ImageMagick convert utility was not found. Please pass to advanced mode and provide its full path") ENDIF(NOT IMAGEMAGICK_CONVERT_EXECUTABLE) # # Find a pdf reader # INCLUDE (FindPDFReader.cmake) IF(NOT PDF_READER) MESSAGE("A pdf reader was not found. Please provide the full path to a pdf reader executable in the PDF_READER variable.") ENDIF(NOT PDF_READER) IF (BUILD_FIGURES) # # # ADD THE LIST OF INPUT IMAGES YOU WANT FLIPPED HERE. # # NOTE: # If ON, all input images in the list and all outputs that use these images # as inputs in cmd line args will be flipped about 'y'. The command line # argument itself does not run using the flipped images; instead the eps # images corresponding to the inputs mentioned in the list and their output # dependencies are flipped for inclusion in the TEX document. OPTION(IGSTK_FLIP_INPUTS_AND_THEIR_OUTPUTS "Flip the input images specified in CMakeLists and their corresponding outputs" ON) SET(IGSTK_FLIP_IMG ) # END FLIP_INPUTS LIST # # Art Directory with images and diagrams # SUBDIRS(Art) # Examples Directory is where .cxx files are converted # into .tex by a perl script. SUBDIRS(Examples) # Latex Directory with tex files # SUBDIRS(Latex) ELSE( BUILD_FIGURES ) # # Art Directory with images and diagrams # SUBDIRS(Art) # # Examples Directory is where .cxx files are converted # into .tex by a perl script. SUBDIRS(Examples) # Latex Directory with tex files # SUBDIRS(Latex) ENDIF( BUILD_FIGURES )