WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-ADD_CUSTOM_TARGET(BUILD_HTML ALL DEPENDS ${HTML_ROOT_FILE})
+SET(PDF_ROOT_FILE latex/Makefile)
+
+ADD_CUSTOM_COMMAND(OUTPUT ${PDF_ROOT_FILE}
+ COMMAND ${CMAKE_COMMAND} -E make_directory latex
+ COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/salome/tutorial -b latex ${ALLSPHINXOPTS} latex
+ COMMAND make -C latex all-pdf
+ DEPENDS ${RSTFILES}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+ADD_CUSTOM_TARGET(BUILD_HTML ALL DEPENDS ${PDF_ROOT_FILE} ${HTML_ROOT_FILE})
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
DESTINATION ${SALOME_INSTALL_DOC}/gui/HYDRO_tutorial