[cmake] Use local MathJax version if available
This will search for a local version of MathJax and use it if found. If not, we fall back to the cdn version. This should e.g. find a MathJax version installed as Debian package.
The behaviour can be configured using the two CMake variables
DUNE_FUNCTIONS_MATHJAX_DISABLE_LOCAL and
DUNE_FUNCTIONS_MATHJAX_DISABLE_CDN which allow to disable
the local and cdn version independently.
The former can be used to disable the local version e.g. to
get a portable doxygen documentation (with or without cdn MathJax).
The latter allows to disable the cdn version to safely avoid a
'privacy breach' even if there's no local MathJax.
A few comments on the implementation:
- This requires to provide a patched version of dune-common's
prepare_doxyfilemacro in order to pass the MathJax options to Doxygen. - One may want to add the patched macro to dune-common.
- The check for MathJax could be extracted as
FindMathJax. - The handling of the two user variables could also be moved to dune-common, since the usage in a module is opt-in anyway.
- Someone with more CMake experience should check the code.
Edited by Carsten Gräser