2013-10-15 15:17:36 +00:00
|
|
|
#.rst:
|
|
|
|
# FindLATEX
|
|
|
|
# ---------
|
|
|
|
#
|
|
|
|
# Find Latex
|
|
|
|
#
|
2002-09-30 16:24:41 +00:00
|
|
|
# This module finds if Latex is installed and determines where the
|
2013-10-15 15:17:36 +00:00
|
|
|
# executables are. This code sets the following variables:
|
2012-08-13 17:42:58 +00:00
|
|
|
#
|
2013-10-15 15:17:36 +00:00
|
|
|
# ::
|
2002-09-30 16:24:41 +00:00
|
|
|
#
|
2013-10-15 15:17:36 +00:00
|
|
|
# LATEX_COMPILER: path to the LaTeX compiler
|
|
|
|
# PDFLATEX_COMPILER: path to the PdfLaTeX compiler
|
|
|
|
# BIBTEX_COMPILER: path to the BibTeX compiler
|
|
|
|
# MAKEINDEX_COMPILER: path to the MakeIndex compiler
|
|
|
|
# DVIPS_CONVERTER: path to the DVIPS converter
|
|
|
|
# PS2PDF_CONVERTER: path to the PS2PDF converter
|
|
|
|
# LATEX2HTML_CONVERTER: path to the LaTeX2Html converter
|
2002-09-30 16:24:41 +00:00
|
|
|
|
2009-09-28 15:45:50 +00:00
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2002-2009 Kitware, Inc.
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-08-07 00:48:47 +00:00
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
2009-09-28 15:45:50 +00:00
|
|
|
# License text for the above reference.)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
if (WIN32)
|
2003-01-23 15:37:46 +00:00
|
|
|
|
|
|
|
# Try to find the MikTex binary path (look for its package manager).
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_path(MIKTEX_BINARY_PATH mpm.exe
|
2003-01-23 15:37:46 +00:00
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MiK\\MiKTeX\\CurrentVersion\\MiKTeX;Install Root]/miktex/bin"
|
2012-08-13 17:42:58 +00:00
|
|
|
DOC
|
2003-01-23 15:37:46 +00:00
|
|
|
"Path to the MikTex binary directory."
|
|
|
|
)
|
2012-08-13 17:47:32 +00:00
|
|
|
mark_as_advanced(MIKTEX_BINARY_PATH)
|
2003-01-23 15:37:46 +00:00
|
|
|
|
|
|
|
# Try to find the GhostScript binary path (look for gswin32).
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
get_filename_component(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00
|
2003-01-23 15:37:46 +00:00
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\8.00;GS_DLL]" PATH
|
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
get_filename_component(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04
|
2003-01-23 15:37:46 +00:00
|
|
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\7.04;GS_DLL]" PATH
|
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_path(GHOSTSCRIPT_BINARY_PATH gswin32.exe
|
2003-01-23 15:37:46 +00:00
|
|
|
${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00}
|
|
|
|
${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04}
|
|
|
|
DOC "Path to the GhostScript binary directory."
|
|
|
|
)
|
2012-08-13 17:47:32 +00:00
|
|
|
mark_as_advanced(GHOSTSCRIPT_BINARY_PATH)
|
2003-01-23 15:37:46 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_path(GHOSTSCRIPT_LIBRARY_PATH ps2pdf13.bat
|
2003-01-23 15:37:46 +00:00
|
|
|
"${GHOSTSCRIPT_BINARY_PATH}/../lib"
|
|
|
|
DOC "Path to the GhostScript library directory."
|
|
|
|
)
|
2012-08-13 17:47:32 +00:00
|
|
|
mark_as_advanced(GHOSTSCRIPT_LIBRARY_PATH)
|
2003-01-23 15:37:46 +00:00
|
|
|
|
2012-08-13 17:50:14 +00:00
|
|
|
endif ()
|
2003-01-23 15:37:46 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(LATEX_COMPILER
|
2002-09-30 16:24:41 +00:00
|
|
|
NAMES latex
|
2003-01-23 15:37:46 +00:00
|
|
|
PATHS ${MIKTEX_BINARY_PATH}
|
2003-01-28 13:53:27 +00:00
|
|
|
/usr/bin
|
2002-09-30 16:24:41 +00:00
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(PDFLATEX_COMPILER
|
2003-08-07 20:32:20 +00:00
|
|
|
NAMES pdflatex
|
|
|
|
PATHS ${MIKTEX_BINARY_PATH}
|
|
|
|
/usr/bin
|
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(BIBTEX_COMPILER
|
2002-09-30 16:24:41 +00:00
|
|
|
NAMES bibtex
|
2003-01-23 15:37:46 +00:00
|
|
|
PATHS ${MIKTEX_BINARY_PATH}
|
2003-01-28 13:53:27 +00:00
|
|
|
/usr/bin
|
2002-09-30 16:24:41 +00:00
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(MAKEINDEX_COMPILER
|
2003-01-23 15:37:46 +00:00
|
|
|
NAMES makeindex
|
|
|
|
PATHS ${MIKTEX_BINARY_PATH}
|
2003-01-28 13:53:27 +00:00
|
|
|
/usr/bin
|
2002-09-30 16:24:41 +00:00
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(DVIPS_CONVERTER
|
2002-09-30 16:24:41 +00:00
|
|
|
NAMES dvips
|
2003-01-23 15:37:46 +00:00
|
|
|
PATHS ${MIKTEX_BINARY_PATH}
|
2003-01-28 13:53:27 +00:00
|
|
|
/usr/bin
|
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(DVIPDF_CONVERTER
|
2003-01-28 13:53:27 +00:00
|
|
|
NAMES dvipdfm dvipdft dvipdf
|
|
|
|
PATHS ${MIKTEX_BINARY_PATH}
|
|
|
|
/usr/bin
|
2002-09-30 16:24:41 +00:00
|
|
|
)
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
if (WIN32)
|
|
|
|
find_program(PS2PDF_CONVERTER
|
2003-01-23 15:42:06 +00:00
|
|
|
NAMES ps2pdf14.bat
|
2003-01-23 15:37:46 +00:00
|
|
|
PATHS ${GHOSTSCRIPT_LIBRARY_PATH}
|
|
|
|
)
|
2012-08-13 17:50:14 +00:00
|
|
|
else ()
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(PS2PDF_CONVERTER
|
2003-08-19 12:53:14 +00:00
|
|
|
NAMES ps2pdf14 ps2pdf
|
2003-01-23 15:37:46 +00:00
|
|
|
)
|
2012-08-13 17:50:14 +00:00
|
|
|
endif ()
|
2003-01-22 16:11:41 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
find_program(LATEX2HTML_CONVERTER
|
2003-08-07 20:32:20 +00:00
|
|
|
NAMES latex2html
|
|
|
|
PATHS ${MIKTEX_BINARY_PATH}
|
|
|
|
/usr/bin
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
mark_as_advanced(
|
2003-01-23 15:37:46 +00:00
|
|
|
LATEX_COMPILER
|
2003-08-07 20:32:20 +00:00
|
|
|
PDFLATEX_COMPILER
|
2003-01-23 15:37:46 +00:00
|
|
|
BIBTEX_COMPILER
|
|
|
|
MAKEINDEX_COMPILER
|
|
|
|
DVIPS_CONVERTER
|
2003-10-30 18:33:51 +00:00
|
|
|
DVIPDF_CONVERTER
|
2003-01-23 15:37:46 +00:00
|
|
|
PS2PDF_CONVERTER
|
2003-08-07 20:32:20 +00:00
|
|
|
LATEX2HTML_CONVERTER
|
2003-01-23 15:37:46 +00:00
|
|
|
)
|