CMakeLists.txt 1.64 KB
Newer Older
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
1
cmake_minimum_required(VERSION 2.8)
2
project(UsersGuides NONE)
3
include(CMakeDependentOption)
4
include(CTest)
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
5

6
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
7

8
option(ENABLE_PARAVIEW_GUIDE "Build 'The ParaView Guide'" ON)
9 10 11 12 13
cmake_dependent_option(ENABLE_PARAVIEW_GUIDE_EXTRAS
  "Build 'The ParaView Guide with Extras' (non-CE)" OFF
  ENABLE_PARAVIEW_GUIDE OFF)
mark_as_advanced(ENABLE_PARAVIEW_GUIDE_EXTRAS)

14 15 16 17 18 19 20 21 22 23 24 25
# find git last commit hash
if (__BUILDBOT_UPLOAD_FILES)
  set(MOST_RECENT_TAG "unknown")
  add_custom_target(upload_pdf ALL)
  find_package(Git REQUIRED)
  execute_process(
    COMMAND "${GIT_EXECUTABLE}" "describe"
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
    OUTPUT_VARIABLE MOST_RECENT_TAG
    OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()

26
if(ENABLE_PARAVIEW_GUIDE)
27 28 29
  add_subdirectory(ParaView)
endif()

30 31
option(ENABLE_CATALYST_USERS_GUIDE "Build 'Catalyst User's Guide'" OFF)
if(ENABLE_CATALYST_USERS_GUIDE)
32
  add_subdirectory(ParaViewCatalyst)
33 34
endif()

35 36 37
configure_file(CMake/TestLatexLog.cmake
  ${CMAKE_BINARY_DIR}/CMake/TestLatexLog.cmake COPYONLY)

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
if(WIN32)
  find_program(PDFLATEX_EXECUTABLE
    NAMES pdflatex
    PATH_SUFFIXES
      "MiKTeX 2.9/miktex/bin"
    )
  if(NOT PDFLATEX_EXECUTABLE)
    message(FATAL_ERROR "pdflatex.exe not found.  "
      "Set PDFLATEX_EXECUTABLE to the location of a pdflatex "
      "with at least these packages installed:
 framed
 url
 ")
  endif()
  get_filename_component(pdflatex_dir "${PDFLATEX_EXECUTABLE}" PATH)
  string(REPLACE "/" "\\" pdflatex_dir "${pdflatex_dir}")
  configure_file(Utilities/Scripts/make-latex.cmd.in make-latex.cmd @ONLY)
55
endif()
56 57

add_subdirectory(ParaViewGettingStarted)