Skip to content
Snippets Groups Projects
Commit 67c782b6 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

Merge branch '1837-cookbook-ninja' into 'develop'

Resolve "Building cookbook fails with ninja"

Closes #1837

See merge request orfeotoolbox/otb!376
parents a748291a 8ec9c107
No related branches found
No related tags found
No related merge requests found
......@@ -49,11 +49,15 @@ mark_as_advanced(SPHINX_BUILD)
find_program(PDFLATEX_COMMAND NAMES pdflatex )
mark_as_advanced(PDFLATEX_COMMAND)
find_program(MAKEINDEX_COMMAND NAMES makeindex )
mark_as_advanced(MAKEINDEX_COMMAND)
# Check that we found everything we need
foreach(cmd
LATEX_COMMAND
TAR_COMMAND
PDFLATEX_COMMAND
MAKEINDEX_COMMAND
SPHINX_BUILD
SH_INTERP)
if(NOT ${cmd})
......@@ -171,9 +175,16 @@ add_custom_target(CookBookArchive
COMMENT "Generating Tex files from rst"
VERBATIM)
set(COOKBOOK_TEX CookBook-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH})
add_custom_target(CookBookPDF
ALL
COMMAND ${CMAKE_MAKE_PROGRAM} all-pdf
COMMAND ${PDFLATEX_COMMAND} ${COOKBOOK_TEX}.tex
COMMAND ${PDFLATEX_COMMAND} ${COOKBOOK_TEX}.tex
COMMAND ${PDFLATEX_COMMAND} ${COOKBOOK_TEX}.tex
COMMAND ${MAKEINDEX_COMMAND} -s python.ist "${COOKBOOK_TEX}.idx" || true
COMMAND ${PDFLATEX_COMMAND} ${COOKBOOK_TEX}.tex
COMMAND ${PDFLATEX_COMMAND} ${COOKBOOK_TEX}.tex
WORKING_DIRECTORY ${LATEX_DIR}
DEPENDS CookBookTexFromRST
COMMENT "Building RST documentation in pdf")
......@@ -63,10 +63,10 @@ copyright = u'@OTB_COPYRIGHT_TEXT@'
# built documents.
#
# The short X.Y version.
version = '@OTB_VERSION@'
version = '@OTB_VERSION_STRING@'
#version = '5.2.0'
# The full version, including alpha/beta/rc tags.
release = '@OTB_VERSION@'
release = '@OTB_VERSION_STRING@'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......@@ -206,6 +206,7 @@ htmlhelp_basename = 'OTBCookBookdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
'inputenc': '\\usepackage[latin10,utf8]{inputenc}',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
......@@ -213,7 +214,7 @@ latex_elements = {
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
'preamble': '\\DeclareUnicodeCharacter{021B}{\\textcommabelow t}'
}
# Grouping the document tree into LaTeX files. List of tuples
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment