From c5b50455d77a77c4b02a413d758378e0e8d3537b Mon Sep 17 00:00:00 2001 From: Marcus Weseloh Date: Sat, 7 Nov 2020 21:14:19 +0100 Subject: [PATCH] Use xsltproc to include settings in API documentation --- doc/CMakeLists.txt | 13 ++++++ doc/Doxyfile.cmake | 2 +- doc/doxygen/fluidsettings.xsl | 77 +++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 doc/doxygen/fluidsettings.xsl diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index c7f84f77..a6940dcc 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -29,6 +29,19 @@ if ( DOXYGEN_FOUND ) ) endif ( DOXYGEN_FOUND ) +find_package ( LibXslt ) +if ( LIBXSLT_XSLTPROC_EXECUTABLE ) + add_custom_target ( doxygen_settings + ${LIBXSLT_XSLTPROC_EXECUTABLE} + --output ${CMAKE_CURRENT_BINARY_DIR}/fluidsettings.txt + ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/fluidsettings.xsl + ${CMAKE_CURRENT_SOURCE_DIR}/fluidsettings.xml + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + add_dependencies(doxygen doxygen_settings) +endif ( LIBXSLT_XSLTPROC_EXECUTABLE ) + + if ( UNIX ) install ( FILES fluidsynth.1 DESTINATION ${MAN_INSTALL_DIR} ) diff --git a/doc/Doxyfile.cmake b/doc/Doxyfile.cmake index edf5dda2..2852fc88 100644 --- a/doc/Doxyfile.cmake +++ b/doc/Doxyfile.cmake @@ -82,7 +82,7 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = @CMAKE_SOURCE_DIR@/doc/fluidsynth-v20-devdoc.txt @CMAKE_SOURCE_DIR@/include @CMAKE_SOURCE_DIR@/include/fluidsynth @CMAKE_SOURCE_DIR@/src @CMAKE_BINARY_DIR@/include/fluidsynth +INPUT = @CMAKE_SOURCE_DIR@/doc/fluidsynth-v20-devdoc.txt @CMAKE_SOURCE_DIR@/include @CMAKE_SOURCE_DIR@/include/fluidsynth @CMAKE_SOURCE_DIR@/src @CMAKE_BINARY_DIR@/include/fluidsynth @CMAKE_BINARY_DIR@/doc/fluidsettings.txt INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.c *.h RECURSIVE = YES diff --git a/doc/doxygen/fluidsettings.xsl b/doc/doxygen/fluidsettings.xsl new file mode 100644 index 00000000..0f880164 --- /dev/null +++ b/doc/doxygen/fluidsettings.xsl @@ -0,0 +1,77 @@ + + + + + + +/*! +\page FluidSettings FluidSynth Settings + + + + + + + +*/ + + + + + +- \subpage + + + + + +\page + + + + + + + + +\section + + +\par Type + + Boolean (int) + Integer (int) + + + Selection (str) + String (str) + + + Float (num) + + + + + \par Options + + \par Values + 0, 1 + \par Min - Max + - + + +\par Default +\htmlonly + +\endhtmlonly + + +\deprecated This setting is deprecated and might be removed in a future version of FluidSynth. + + +\htmlonly + +\endhtmlonly + + +