Hi Brad,
concerning FindLATEX again:

> Applied:
> 
>  FindLATEX: Add components handling
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07a3f9ad

The link does not work and I couldn't find the commit in next. Can you
double check whether you pushed it?

> with minor documentation tweaks and one logic fix:
> 
>  -#   set(LATEX_MAKEINDEX_FOUND TRUE)
>  +  set(LATEX_MAKEINDEX_FOUND TRUE)
> 
> that looked left from local testing.

Sorry, you are right. Thanks for the heads-up. I attached the right
patch this time.

Additionally I attached patches to add more LaTeX-related component we
should test. This includes Biber (BibTeX replacement), xindy (makeindex
replacement), pdftops, htlatex (compiler to HTML), XeLaTeX and LuaLaTeX.

Bye
Christoph
From b140186f9e712705d7c33bf71dd9c2dc592b871e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruen...@dune-project.org>
Date: Sun, 28 Dec 2014 09:58:53 +0100
Subject: [PATCH 1/4] FindLATEX: Add components handling

---
 Modules/FindLATEX.cmake | 78 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 72 insertions(+), 6 deletions(-)

diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake
index a935f00..a6c8937 100644
--- a/Modules/FindLATEX.cmake
+++ b/Modules/FindLATEX.cmake
@@ -6,17 +6,42 @@
 #
 # This module finds an installed Latex and determines the location
 # of the compiler.  Additionally the module looks for Latex-related
-# software like BibTeX.  This code sets the following variables:
+# software like BibTeX.
+#
+# This module sets the following result variables:
 #
 # ::
 #
+#   LATEX_FOUND:          whether found Latex and requested components
+#   LATEX_<component>_FOUND:  whether found <component>
 #   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
+#   DVIPDF_CONVERTER:     path to the DVIPDF converter
 #   PS2PDF_CONVERTER:     path to the PS2PDF converter
 #   LATEX2HTML_CONVERTER: path to the LaTeX2Html converter
+#
+# Possible components are:
+#
+# ::
+#
+#  PDFLATEX
+#  BIBTEX
+#  MAKEINDEX
+#  DVIPS
+#  DVIPDF
+#  PS2PDF
+#  LATEX2HTML
+#
+# Example Usages:
+#
+# ::
+#
+#   find_package(LATEX)
+#   find_package(LATEX COMPONENTS PDFLATEX)
+#   find_package(LATEX COMPONENTS BIBTEX PS2PDF)
 
 #=============================================================================
 # Copyright 2002-2014 Kitware, Inc.
@@ -32,9 +57,7 @@
 #  License text for the above reference.)
 
 if (WIN32)
-
   # Try to find the MikTex binary path (look for its package manager).
-
   find_path(MIKTEX_BINARY_PATH mpm.exe
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MiK\\MiKTeX\\CurrentVersion\\MiKTeX;Install Root]/miktex/bin"
     DOC
@@ -43,7 +66,6 @@ if (WIN32)
   mark_as_advanced(MIKTEX_BINARY_PATH)
 
   # Try to find the GhostScript binary path (look for gswin32).
-
   get_filename_component(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00
      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\8.00;GS_DLL]" PATH
   )
@@ -64,45 +86,76 @@ if (WIN32)
     DOC "Path to the GhostScript library directory."
   )
   mark_as_advanced(GHOSTSCRIPT_LIBRARY_PATH)
-
 endif ()
 
+# try to find Latex and the related programs
 find_program(LATEX_COMPILER
   NAMES latex
   PATHS ${MIKTEX_BINARY_PATH}
         /usr/bin
 )
 
+# find pdflatex
 find_program(PDFLATEX_COMPILER
   NAMES pdflatex
   PATHS ${MIKTEX_BINARY_PATH}
         /usr/bin
 )
+if (PDFLATEX_COMPILER)
+  set(LATEX_PDFLATEX_FOUND TRUE)
+else()
+  set(LATEX_PDFLATEX_FOUND FALSE)
+endif()
 
+# find bibtex
 find_program(BIBTEX_COMPILER
   NAMES bibtex
   PATHS ${MIKTEX_BINARY_PATH}
         /usr/bin
 )
+if (BIBTEX_COMPILER)
+  set(LATEX_BIBTEX_FOUND TRUE)
+else()
+  set(LATEX_BIBTEX_FOUND FALSE)
+endif()
 
+# find makeindex
 find_program(MAKEINDEX_COMPILER
   NAMES makeindex
   PATHS ${MIKTEX_BINARY_PATH}
         /usr/bin
 )
+if (MAKEINDEX_COMPILER)
+   set(LATEX_MAKEINDEX_FOUND TRUE)
+else()
+  set(LATEX_MAKEINDEX_FOUND FALSE)
+endif()
 
+# find dvips
 find_program(DVIPS_CONVERTER
   NAMES dvips
   PATHS ${MIKTEX_BINARY_PATH}
         /usr/bin
 )
+if (DVIPS_CONVERTER)
+  set(LATEX_DVIPS_FOUND TRUE)
+else()
+  set(LATEX_DVIPS_FOUND FALSE)
+endif()
 
+# find dvipdf
 find_program(DVIPDF_CONVERTER
   NAMES dvipdfm dvipdft dvipdf
   PATHS ${MIKTEX_BINARY_PATH}
         /usr/bin
 )
+if (DVIPDF_CONVERTER)
+  set(LATEX_DVIPDF_FOUND TRUE)
+else()
+  set(LATEX_DVIPDF_FOUND FALSE)
+endif()
 
+# find ps2pdf
 if (WIN32)
   find_program(PS2PDF_CONVERTER
     NAMES ps2pdf14.bat ps2pdf14 ps2pdf
@@ -114,12 +167,23 @@ else ()
     NAMES ps2pdf14 ps2pdf
   )
 endif ()
+if (PS2PDF_CONVERTER)
+  set(LATEX_PS2PDF_FOUND TRUE)
+else()
+  set(LATEX_PS2PDF_FOUND FALSE)
+endif()
 
+# find latex2html
 find_program(LATEX2HTML_CONVERTER
   NAMES latex2html
   PATHS ${MIKTEX_BINARY_PATH}
         /usr/bin
 )
+if (LATEX2HTML_CONVERTER)
+  set(LATEX_LATEX2HTML_FOUND TRUE)
+else()
+  set(LATEX_LATEX2HTML_FOUND FALSE)
+endif()
 
 
 mark_as_advanced(
@@ -133,7 +197,9 @@ mark_as_advanced(
   LATEX2HTML_CONVERTER
 )
 
+# handle variables for found Latex and its components
 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-find_package_handle_standard_args(Latex
+find_package_handle_standard_args(LATEX
   REQUIRED_VARS LATEX_COMPILER
+  HANDLE_COMPONENTS
 )
-- 
2.1.2

From 244c98f4b05ac995fe59ecb8fb5590f0402ccc9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruen...@dune-project.org>
Date: Sat, 10 Jan 2015 10:56:35 +0100
Subject: [PATCH 2/4] FindLATEX: Add components PDFtoPS and HTLATEX

---
 Modules/FindLATEX.cmake | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake
index a6c8937..c4c8761 100644
--- a/Modules/FindLATEX.cmake
+++ b/Modules/FindLATEX.cmake
@@ -21,7 +21,9 @@
 #   DVIPS_CONVERTER:      path to the DVIPS converter
 #   DVIPDF_CONVERTER:     path to the DVIPDF converter
 #   PS2PDF_CONVERTER:     path to the PS2PDF converter
+#   PDFTOPS_CONVERTER:    path to the pdftops converter
 #   LATEX2HTML_CONVERTER: path to the LaTeX2Html converter
+#   HTLATEX_COMPILER:     path to the htlatex compiler
 #
 # Possible components are:
 #
@@ -33,7 +35,9 @@
 #  DVIPS
 #  DVIPDF
 #  PS2PDF
+#  PDFTOPS
 #  LATEX2HTML
+#  HTLATEX
 #
 # Example Usages:
 #
@@ -173,6 +177,18 @@ else()
   set(LATEX_PS2PDF_FOUND FALSE)
 endif()
 
+# find pdftops
+find_program(PDFTOPS_CONVERTER
+  NAMES pdftops
+  PATHS ${MIKTEX_BINARY_PATH}
+        /usr/bin
+)
+if (PDFTOPS_CONVERTER)
+  set(LATEX_PDFTOPS_FOUND TRUE)
+else()
+  set(LATEX_PDFTOPS_FOUND FALSE)
+endif()
+
 # find latex2html
 find_program(LATEX2HTML_CONVERTER
   NAMES latex2html
@@ -185,6 +201,18 @@ else()
   set(LATEX_LATEX2HTML_FOUND FALSE)
 endif()
 
+# find htlatex
+find_program(HTLATEX_COMPILER
+  NAMES htlatex
+  PATHS ${MIKTEX_BINARY_PATH}
+        /usr/bin
+)
+if (HTLATEX_COMPILER)
+  set(LATEX_HTLATEX_FOUND TRUE)
+else()
+  set(LATEX_HTLATEX_FOUND FALSE)
+endif()
+
 
 mark_as_advanced(
   LATEX_COMPILER
@@ -194,7 +222,9 @@ mark_as_advanced(
   DVIPS_CONVERTER
   DVIPDF_CONVERTER
   PS2PDF_CONVERTER
+  PDFTOPS_CONVERTER
   LATEX2HTML_CONVERTER
+  HTLATEX_COMPILER
 )
 
 # handle variables for found Latex and its components
-- 
2.1.2

From 45d987da370bf3437c93f3355d8a6a778f861f32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruen...@dune-project.org>
Date: Sat, 10 Jan 2015 12:10:03 +0100
Subject: [PATCH 3/4] FindLATEX: Add components Biber and xindy

---
 Modules/FindLATEX.cmake | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake
index c4c8761..14101b4 100644
--- a/Modules/FindLATEX.cmake
+++ b/Modules/FindLATEX.cmake
@@ -17,7 +17,9 @@
 #   LATEX_COMPILER:       path to the LaTeX compiler
 #   PDFLATEX_COMPILER:    path to the PdfLaTeX compiler
 #   BIBTEX_COMPILER:      path to the BibTeX compiler
+#   BIBER_COMPILER:       path to the Biber compiler
 #   MAKEINDEX_COMPILER:   path to the MakeIndex compiler
+#   XINDY_COMPILER:       path to the xindy compiler
 #   DVIPS_CONVERTER:      path to the DVIPS converter
 #   DVIPDF_CONVERTER:     path to the DVIPDF converter
 #   PS2PDF_CONVERTER:     path to the PS2PDF converter
@@ -31,7 +33,9 @@
 #
 #  PDFLATEX
 #  BIBTEX
+#  BIBER
 #  MAKEINDEX
+#  XINDY
 #  DVIPS
 #  DVIPDF
 #  PS2PDF
@@ -123,6 +127,18 @@ else()
   set(LATEX_BIBTEX_FOUND FALSE)
 endif()
 
+# find biber
+find_program(BIBER_COMPILER
+  NAMES biber
+  PATHS ${MIKTEX_BINARY_PATH}
+        /usr/bin
+)
+if (BIBER_COMPILER)
+  set(LATEX_BIBER_FOUND TRUE)
+else()
+  set(LATEX_BIBER_FOUND FALSE)
+endif()
+
 # find makeindex
 find_program(MAKEINDEX_COMPILER
   NAMES makeindex
@@ -135,6 +151,18 @@ else()
   set(LATEX_MAKEINDEX_FOUND FALSE)
 endif()
 
+# find xindy
+find_program(XINDY_COMPILER
+  NAMES xindy
+  PATHS ${MIKTEX_BINARY_PATH}
+        /usr/bin
+)
+if (XINDY_COMPILER)
+   set(LATEX_XINDY_FOUND TRUE)
+else()
+  set(LATEX_XINDY_FOUND FALSE)
+endif()
+
 # find dvips
 find_program(DVIPS_CONVERTER
   NAMES dvips
@@ -218,7 +246,9 @@ mark_as_advanced(
   LATEX_COMPILER
   PDFLATEX_COMPILER
   BIBTEX_COMPILER
+  BIBER_COMPILER
   MAKEINDEX_COMPILER
+  XINDY_COMPILER
   DVIPS_CONVERTER
   DVIPDF_CONVERTER
   PS2PDF_CONVERTER
-- 
2.1.2

From 4e3746ebee808ec5297743013e2bec378897eadd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruen...@dune-project.org>
Date: Sat, 10 Jan 2015 14:48:31 +0100
Subject: [PATCH 4/4] FindLATEX: Add components for XeLaTeX and LuaLaTeX

---
 Modules/FindLATEX.cmake | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake
index 14101b4..1583350 100644
--- a/Modules/FindLATEX.cmake
+++ b/Modules/FindLATEX.cmake
@@ -16,6 +16,8 @@
 #   LATEX_<component>_FOUND:  whether found <component>
 #   LATEX_COMPILER:       path to the LaTeX compiler
 #   PDFLATEX_COMPILER:    path to the PdfLaTeX compiler
+#   XELATEX_COMPILER:     path to the XeLaTeX compiler
+#   LUALATEX_COMPILER:    path to the LuaLaTeX compiler
 #   BIBTEX_COMPILER:      path to the BibTeX compiler
 #   BIBER_COMPILER:       path to the Biber compiler
 #   MAKEINDEX_COMPILER:   path to the MakeIndex compiler
@@ -32,6 +34,8 @@
 # ::
 #
 #  PDFLATEX
+#  XELATEX
+#  LUALATEX
 #  BIBTEX
 #  BIBER
 #  MAKEINDEX
@@ -52,7 +56,8 @@
 #   find_package(LATEX COMPONENTS BIBTEX PS2PDF)
 
 #=============================================================================
-# Copyright 2002-2014 Kitware, Inc.
+# Copyright 2002-2015 Kitware, Inc.
+# Copyright 2014-2015 Christoph Grüninger <f...@grueninger.de>
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
@@ -115,6 +120,30 @@ else()
   set(LATEX_PDFLATEX_FOUND FALSE)
 endif()
 
+# find xelatex
+find_program(XELATEX_COMPILER
+  NAMES xelatex
+  PATHS ${MIKTEX_BINARY_PATH}
+        /usr/bin
+)
+if (XELATEX_COMPILER)
+  set(LATEX_XELATEX_FOUND TRUE)
+else()
+  set(LATEX_XELATEX_FOUND FALSE)
+endif()
+
+# find lualatex
+find_program(LUALATEX_COMPILER
+  NAMES lualatex
+  PATHS ${MIKTEX_BINARY_PATH}
+        /usr/bin
+)
+if (LUALATEX_COMPILER)
+  set(LATEX_LUALATEX_FOUND TRUE)
+else()
+  set(LATEX_LUALATEX_FOUND FALSE)
+endif()
+
 # find bibtex
 find_program(BIBTEX_COMPILER
   NAMES bibtex
@@ -245,6 +274,8 @@ endif()
 mark_as_advanced(
   LATEX_COMPILER
   PDFLATEX_COMPILER
+  XELATEX_COMPILER
+  LUALATEX_COMPILER
   BIBTEX_COMPILER
   BIBER_COMPILER
   MAKEINDEX_COMPILER
-- 
2.1.2

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to