Author: A. Maitland Bottoms <bottoms@debian.org>
Forwarded: not-needed
Description: doxygen pdf
 Work-In-Progress Debian inclusion of PDF format documentation.

--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -10,6 +10,15 @@
 
     message(STATUS "Doxygen found. Building docs ...")
 
+    find_package(LATEX COMPONENTS PDFLATEX)
+
+    if(ENABLE_DOXYGEN_PDF AND LATEX_FOUND)
+        set(enable_pdf_docs YES)
+        message(STATUS "latex found. Building PDF docs ...")
+    else()
+        set(enable_pdf_docs NO)
+    endif()
+
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile
                    @ONLY)
 
@@ -20,4 +29,12 @@
         COMMENT "Generating documentation with Doxygen"
         VERBATIM)
 
+    add_custom_target(
+        volk_pdf_doc
+        make
+        DEPENDS volk_doc
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/latex
+        COMMENT "Generating PDF documentation with Doxygen"
+        VERBATIM)
+
 endif(DOXYGEN_FOUND)
--- a/docs/Doxyfile.in
+++ b/docs/Doxyfile.in
@@ -1795,7 +1795,7 @@
 # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
 # The default value is: YES.
 
-GENERATE_LATEX         = NO
+GENERATE_LATEX         = @enable_pdf_docs@
 
 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
@@ -1815,7 +1815,7 @@
 # the output language.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
-LATEX_CMD_NAME         = latex
+LATEX_CMD_NAME         = xelatex
 
 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
 # index for LaTeX.
@@ -1864,7 +1864,7 @@
 # If left blank no extra packages will be included.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
-EXTRA_PACKAGES         =
+EXTRA_PACKAGES         = {amsmath} {pmboxdraw} {unicode-math}
 
 # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
 # generated LaTeX document. The header should contain everything until the first
@@ -2366,7 +2366,7 @@
 # set to NO
 # The default value is: YES.
 
-HAVE_DOT               = NO
+HAVE_DOT               = YES
 
 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
 # to run in parallel. When set to 0 doxygen will base this on the number of
