Revision: 4463
          http://playerstage.svn.sourceforge.net/playerstage/?rev=4463&view=rev
Author:   gbiggs
Date:     2008-03-30 22:52:42 -0700 (Sun, 30 Mar 2008)

Log Message:
-----------
Compile LaTeX documentation to PDF

Modified Paths:
--------------
    code/player/branches/cmake/doc/CMakeLists.txt

Added Paths:
-----------
    code/player/branches/cmake/cmake/internal/CompileLatex.cmake

Added: code/player/branches/cmake/cmake/internal/CompileLatex.cmake
===================================================================
--- code/player/branches/cmake/cmake/internal/CompileLatex.cmake                
                (rev 0)
+++ code/player/branches/cmake/cmake/internal/CompileLatex.cmake        
2008-03-31 05:52:42 UTC (rev 4463)
@@ -0,0 +1,35 @@
+MACRO (COMPILE_LATEX _workingDir _docName)
+    FIND_PACKAGE (LATEX)
+
+    SET (texFile ${_workingDir}/${_docName}.tex)
+    SET (auxFile ${_workingDir}/${_docName}.aux)
+    SET (logFile ${_workingDir}/${_docName}.log)
+    SET (idxFile ${_workingDir}/${_docName}.idx)
+    SET (indFile ${_workingDir}/${_docName}.ind)
+#     SET (dviFile ${_workingDir}/${_docName}.dvi)
+    SET (pdfFile ${_workingDir}/${_docName}.pdf)
+
+    ADD_CUSTOM_COMMAND (OUTPUT ${idxFile}
+        DEPENDS ${texFile}
+        COMMAND ${PDFLATEX_COMPILER}
+        ARGS -interaction=batchmode ${_docName}.tex
+        WORKING_DIRECTORY ${_workingDir}
+        COMMENT "PDFLatex (first pass)")
+
+    ADD_CUSTOM_COMMAND (OUTPUT ${indFile}
+        DEPENDS ${idxFile}
+        COMMAND ${MAKEINDEX_COMPILER}
+        ARGS ${_docName}.idx
+        WORKING_DIRECTORY ${_workingDir}
+        COMMENT "Make index")
+
+    ADD_CUSTOM_COMMAND (OUTPUT ${pdfFile}
+        DEPENDS ${indFile}
+        COMMAND ${PDFLATEX_COMPILER}
+        ARGS -interaction=batchmode ${_docName}.tex
+        WORKING_DIRECTORY ${_workingDir}
+        COMMENT "PDFLatex (second pass)")
+
+    ADD_CUSTOM_TARGET (doc_latex
+        DEPENDS ${pdfFile})
+ENDMACRO (COMPILE_LATEX)

Modified: code/player/branches/cmake/doc/CMakeLists.txt
===================================================================
--- code/player/branches/cmake/doc/CMakeLists.txt       2008-03-31 04:53:09 UTC 
(rev 4462)
+++ code/player/branches/cmake/doc/CMakeLists.txt       2008-03-31 05:52:42 UTC 
(rev 4463)
@@ -59,6 +59,13 @@
         INSTALL (DIRECTORY ${docSourceDir}
             DESTINATION ${docInstallDir})
 
+        # Compile the LaTeX documentation
+        IF (DOXYGEN_LATEX)
+            INCLUDE (${PLAYER_CMAKE_DIR}/internal/CompileLatex.cmake)
+            COMPILE_LATEX (${CMAKE_CURRENT_BINARY_DIR}/latex refman)
+            ADD_DEPENDENCIES (doc_latex doc)
+        ENDIF (DOXYGEN_LATEX)
+
         # Upload documentation target (not supported on Windows)
         SET (docWebDestination "Player-cvs")
         SET (docName "player")


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to