[master] 54213b9 - Doxygen docs: convert doxygen input file to current version

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 54213b9 - Doxygen docs: convert doxygen input file to current version "Albrecht Schlosser" Sep 22, 2021 top right image
 
commit 54213b95fe4262fb7a1d0d857da1723953cba9cc
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Tue Sep 21 20:28:02 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Tue Sep 21 20:28:02 2021 +0200

    Doxygen docs: convert doxygen input file to current version
    
    CMake only: "current" version means the doxygen version available
    on the system where docs are generated.
    
    Todo: do the same for autoconf/make builds.

 documentation/CMakeLists.txt | 43 ++++++++++++++++++++++++++++++++++---------
 1 file changed, 34 insertions(+), 9 deletions(-)

diff --git documentation/CMakeLists.txt documentation/CMakeLists.txt
index 1fa54e1..41ed629 100644
--- documentation/CMakeLists.txt
+++ documentation/CMakeLists.txt
@@ -37,21 +37,33 @@ if (OPTION_BUILD_HTML_DOCUMENTATION)
   set (LATEX_HEADER   "")
 
   configure_file (
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/tiny.png
+    ${CMAKE_CURRENT_BINARY_DIR}/html/tiny.png
+    COPYONLY
+  )
+
+  # configure Doxygen input file for HTML docs (Doxyfile.in)
+
+  configure_file (
     ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
-    ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+    ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.in
     @ONLY
   )
 
-  configure_file (
-    ${CMAKE_CURRENT_SOURCE_DIR}/src/tiny.png
-    ${CMAKE_CURRENT_BINARY_DIR}/html/tiny.png
-    COPYONLY
+  # convert Doxyfile to current doxygen version
+
+  add_custom_command (
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+    COMMAND ${DOXYGEN_EXECUTABLE} -u -s - < Doxyfile.in > Doxyfile
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    COMMENT "Converting Doxyfile to current doxygen version" VERBATIM
   )
 
-  # generate html docs
+  # generate HTML documentation
 
   add_custom_target (html
-    ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+    COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     COMMENT "Generating HTML documentation" VERBATIM
   )
@@ -66,7 +78,7 @@ if (OPTION_BUILD_PDF_DOCUMENTATION)
 
   list (APPEND DOCS pdf)
 
-  # generate Doxygen file "Doxybook"
+  # generate Doxygen input file "Doxybook"
 
   set (GENERATE_HTML  NO)
   set (GENERATE_LATEX YES)
@@ -79,12 +91,23 @@ if (OPTION_BUILD_PDF_DOCUMENTATION)
     OUTPUT_VARIABLE YEAR
   )
 
+  # configure Doxygen input file for PDF docs (Doxybook.in)
+
   configure_file (
     ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
-    ${CMAKE_CURRENT_BINARY_DIR}/Doxybook
+    ${CMAKE_CURRENT_BINARY_DIR}/Doxybook.in
     @ONLY
   )
 
+  # convert Doxybook to current doxygen version
+
+  add_custom_command (
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxybook
+    COMMAND ${DOXYGEN_EXECUTABLE} -u -s - < Doxybook.in > Doxybook
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    COMMENT "Converting Doxybook to current doxygen version" VERBATIM
+  )
+
   # generate LaTeX title fltk-title.tex
 
   configure_file (
@@ -103,6 +126,8 @@ if (OPTION_BUILD_PDF_DOCUMENTATION)
     COMMAND ${DOXYGEN_EXECUTABLE} Doxybook
     COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make_pdf
     COMMAND cp -f latex/refman.pdf fltk.pdf
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxybook
+            ${CMAKE_CURRENT_BINARY_DIR}/fltk-title.tex
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     COMMENT "Generating PDF documentation" VERBATIM
   )
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.