2 # This module finds if Latex is installed and determines where the
3 # executables are. This code sets the following variables:
5 # LATEX_COMPILER: path to the LaTeX compiler
6 # PDFLATEX_COMPILER: path to the PdfLaTeX compiler
7 # BIBTEX_COMPILER: path to the BibTeX compiler
8 # MAKEINDEX_COMPILER: path to the MakeIndex compiler
9 # DVIPS_CONVERTER: path to the DVIPS converter
10 # PS2PDF_CONVERTER: path to the PS2PDF converter
11 # LATEX2HTML_CONVERTER: path to the LaTeX2Html converter
16 # Try to find the MikTex binary path (look for its package manager).
18 FIND_PATH(MIKTEX_BINARY_PATH mpm.exe
19 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MiK\\MiKTeX\\CurrentVersion\\MiKTeX;Install Root]/miktex/bin"
21 "Path to the MikTex binary directory."
23 MARK_AS_ADVANCED(MIKTEX_BINARY_PATH)
25 # Try to find the GhostScript binary path (look for gswin32).
27 GET_FILENAME_COMPONENT(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00
28 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\8.00;GS_DLL]" PATH
31 GET_FILENAME_COMPONENT(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04
32 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\7.04;GS_DLL]" PATH
35 FIND_PATH(GHOSTSCRIPT_BINARY_PATH gswin32.exe
36 ${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00}
37 ${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04}
38 DOC "Path to the GhostScript binary directory."
40 MARK_AS_ADVANCED(GHOSTSCRIPT_BINARY_PATH)
42 FIND_PATH(GHOSTSCRIPT_LIBRARY_PATH ps2pdf13.bat
43 "${GHOSTSCRIPT_BINARY_PATH}/../lib"
44 DOC "Path to the GhostScript library directory."
46 MARK_AS_ADVANCED(GHOSTSCRIPT_LIBRARY_PATH)
50 FIND_HOST_PROGRAM(LATEX_COMPILER
52 PATHS ${MIKTEX_BINARY_PATH}
56 FIND_HOST_PROGRAM(PDFLATEX_COMPILER
58 PATHS ${MIKTEX_BINARY_PATH}
62 FIND_HOST_PROGRAM(BIBTEX_COMPILER
64 PATHS ${MIKTEX_BINARY_PATH}
68 FIND_HOST_PROGRAM(MAKEINDEX_COMPILER
70 PATHS ${MIKTEX_BINARY_PATH}
74 FIND_HOST_PROGRAM(DVIPS_CONVERTER
76 PATHS ${MIKTEX_BINARY_PATH}
80 FIND_HOST_PROGRAM(DVIPDF_CONVERTER
81 NAMES dvipdfm dvipdft dvipdf
82 PATHS ${MIKTEX_BINARY_PATH}
87 FIND_HOST_PROGRAM(PS2PDF_CONVERTER
89 PATHS ${GHOSTSCRIPT_LIBRARY_PATH}
92 FIND_HOST_PROGRAM(PS2PDF_CONVERTER
94 PATHS /usr/bin /usr/texbin
98 FIND_HOST_PROGRAM(LATEX2HTML_CONVERTER
100 PATHS ${MIKTEX_BINARY_PATH}