################################################################################
# You need to install UseLATEX.cmake(http://www.itk.org/Wiki/CMakeUserUseLATEX)
# To build latex pdf, you need an out-of-source build:
#     1, create a build dir in the dir contains CMakeLists.txt and tex files
#        : mkdir build
#     2, go into the build dir
#        : cd build
#     3, building now
#        : cmake .. && make 
################################################################################
project(main)
cmake_minimum_required(VERSION 2.8)

set(CMAKE_MODULE_PATH ${CMAKE_ROOT}/Modules)
message("CMAKE ROOT is ${CMAKE_ROOT}")
message("CMAKE MODULE PATH is ${CMAKE_MODULE_PATH}")
include(${CMAKE_MODULE_PATH}/UseLATEX.cmake)

set(PDFLATEX_COMPILER xelatex)
set(PDFLATEX_COMPILER_FLAGS
        "-shell-escape"
        CACHE STRING "Flags passed to xelatex."
   )


ADD_LATEX_DOCUMENT(presentation.tex
#BIBFILES StageSonification2012.bib SonificationHandbook.bib
   INPUTS figs/coarsening.avi
   IMAGE_DIRS figs 
   DEFAULT_PDF
)