diff --git a/.gitignore b/.gitignore index 4ade85f589b2911e7467bd5390a29a088dbd3f8d..852f22f613dc7c0b368b0deab5364fbe323a3769 100644 --- a/.gitignore +++ b/.gitignore @@ -3,12 +3,15 @@ cmp_tool !test/cmp_tool -#cmp_tool files +# cmp_tool files *.cfg *.info *.dat *.cmp +# Meson subprojects +/subprojects/* +!/subprojects/*.wrap ### C ### # Prerequisites diff --git a/INSTALL.md b/INSTALL.md index 4babccb28977637d79f09c381fce981238eba527..5162e704972513f43923b91aacd97d51a1a35010 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -65,18 +65,18 @@ Unfortunately, the cmp\_tool does not support the Microsoft MSVC compiler. To bu For this, you need the [Mingw-w64 toolchain](https://www.mingw-w64.org/downloads/). To compile on Windows, do this in the Cygwin64 Terminal: ``` -meson setup buiddir_win --native-file=mingw-w64-64.txt -cd buiddir_win -meson compile +meson setup builddir_win --native-file=mingw-w64-64.txt +cd builddir_win +meson compile cmp_tool ``` ### Cross-compile for Windows Cross-compile for Windows is also possible with the [Mingw-w64 toolchain](https://www.mingw-w64.org/downloads/). To cross-compile for Windows use the following commands: ``` -meson setup buiddir_cross_win --cross-file=mingw-w64-64.txt -cd buiddir_cross_win -meson compile +meson setup builddir_cross_win --cross-file=mingw-w64-64.txt +cd builddir_cross_win +meson compile cmp_tool ``` ## Tests diff --git a/doc/doxygen/Doxyfile.in b/doc/doxygen/Doxyfile.in index bd30e4c7447f508b8b932e2e15df9319ee41eee7..54ee23933e6766ad83d887bc7fa91c33451cdfdd 100644 --- a/doc/doxygen/Doxyfile.in +++ b/doc/doxygen/Doxyfile.in @@ -1321,9 +1321,9 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = @DOXYDIR@/doxygen-awesome-css/doxygen-awesome.css \ - @DOXYDIR@/doxygen-awesome-css/doxygen-awesome-sidebar-only.css \ - @DOXYDIR@/doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css +HTML_EXTRA_STYLESHEET = @AWESOMEDIR@/doxygen-awesome.css \ + @AWESOMEDIR@/doxygen-awesome-sidebar-only.css \ + @AWESOMEDIR@/doxygen-awesome-sidebar-only-darkmode-toggle.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1333,9 +1333,9 @@ HTML_EXTRA_STYLESHEET = @DOXYDIR@/doxygen-awesome-css/doxygen-awesome.css \ # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = @DOXYDIR@/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \ - @DOXYDIR@/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \ - @DOXYDIR@/doxygen-awesome-css/doxygen-awesome-interactive-toc.js +HTML_EXTRA_FILES = @AWESOMEDIR@/doxygen-awesome-darkmode-toggle.js \ + @AWESOMEDIR@/doxygen-awesome-fragment-copy-button.js \ + @AWESOMEDIR@/doxygen-awesome-interactive-toc.js # The HTML_COLORSTYLE tag can be used to specify if the generated HTML output diff --git a/doc/doxygen/meson.build b/doc/doxygen/meson.build index a375aae8d9543cfe83cb8ca244b4dad67a985a78..5c6a0d038f73c447de4b10b8b2ed0918d6ca4a07 100644 --- a/doc/doxygen/meson.build +++ b/doc/doxygen/meson.build @@ -2,23 +2,21 @@ Doxyfile_template = files('Doxyfile.in') doc_layout_files = files( 'header.html', - 'meson.build', - 'plato-logo-med.png', - 'doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js', - 'doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js', - 'doxygen-awesome-css/doxygen-awesome-interactive-toc.js', - 'doxygen-awesome-css/doxygen-awesome-paragraph-link.js', - 'doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css', - 'doxygen-awesome-css/doxygen-awesome-sidebar-only.css', - 'doxygen-awesome-css/doxygen-awesome.css', + 'plato-logo-med.png' ) +doxygen_awesome_css_proj = subproject('doxygen-awesome-css') +doxygen_awesome_css_files = doxygen_awesome_css_proj.get_variable('doxygen_awesome_files') +doxygen_awesome_css_dep = doxygen_awesome_css_proj.get_variable('doxygen_awesome_css_dep') +doxygen_awesome_dir = doxygen_awesome_css_dep.get_variable(internal : 'doxygen_awesome_dir') +message(doxygen_awesome_dir) #Build a Doxyfile based on Doxyfile.in cdata_doc = configuration_data() cdata_doc.set('VERSION', meson.project_version()) cdata_doc.set('SRCDIR', meson.project_source_root()) cdata_doc.set('DOXYDIR', meson.current_source_dir()) +cdata_doc.set('AWESOMEDIR', doxygen_awesome_dir) cdata_doc.set('BUILDDIR', meson.project_build_root()) if find_program('dot', required : false).found() cdata_doc.set('HAVE_DOT', 'YES') @@ -39,7 +37,7 @@ if doxygen.found() custom_target('doc', input : doxy_file, output : 'generated_documentation', - depend_files : [doxy_file, doc_layout_files, main, cmplib_sources], # test files are missing + depend_files : [doxy_file, doc_layout_files, doxygen_awesome_css_files, main, cmplib_sources], # test files are missing command : [doxygen, '@INPUT@'], build_by_default : false, console : true, diff --git a/subprojects/doxygen-awesome-css.wrap b/subprojects/doxygen-awesome-css.wrap new file mode 100644 index 0000000000000000000000000000000000000000..668ce8d675ea23ebe2f27a686af9568bf12a1bf8 --- /dev/null +++ b/subprojects/doxygen-awesome-css.wrap @@ -0,0 +1,9 @@ +[wrap-file] +directory = doxygen-awesome-css-2.2.0 +source_url = https://github.com/jothepro/doxygen-awesome-css/archive/refs/tags/v2.2.0.tar.gz +source_filename = doxygen-awesome-css-2.5.2.tar.gz +source_hash = d3d55d91b3609c60e57d34a0fcdc37c67eeba535495511fba2b7d981da531793 +patch_directory = doxygen-awesome-css + +[provide] +doxygen-awesome-css = doxygen_awesome_css_dep diff --git a/subprojects/packagefiles/doxygen-awesome-css/meson.build b/subprojects/packagefiles/doxygen-awesome-css/meson.build new file mode 100644 index 0000000000000000000000000000000000000000..dafeafc9a8fa5d408eaa176a4a0f7a810eff2f2d --- /dev/null +++ b/subprojects/packagefiles/doxygen-awesome-css/meson.build @@ -0,0 +1,25 @@ +project('doxygen-awesome-css', + version: '2.2.0', + meson_version: '>=0.54.0', + license: 'MIT', +) + +# Files to be installed +doxygen_awesome_files= files( + 'doxygen-awesome-darkmode-toggle.js', + 'doxygen-awesome-fragment-copy-button.js', + 'doxygen-awesome-interactive-toc.js', + 'doxygen-awesome-paragraph-link.js', + 'doxygen-awesome-sidebar-only-darkmode-toggle.css', + 'doxygen-awesome-sidebar-only.css', + 'doxygen-awesome.css' +) + + +doxygen_awesome_css_dep = declare_dependency( + sources : doxygen_awesome_files, + variables : {'doxygen_awesome_dir': meson.current_source_dir(), 'number': '3'} +) + + + diff --git a/test/meson.build b/test/meson.build index 877bbd7d05bbafafb9101d5eea8514581b037b65..6a1337f68487c657bf344d16cfadeb47ec75a5f1 100644 --- a/test/meson.build +++ b/test/meson.build @@ -15,7 +15,7 @@ endif cppcheck = find_program('cppcheck', required : false) if cppcheck.found() cppcheck_args = [ - '--project=' + join_paths(meson.build_root(), 'compile_commands.json'), + '--project=' + join_paths(meson.project_build_root(), 'compile_commands.json'), # '--clang', '--cppcheck-build-dir='+meson.current_build_dir(), '--std=c89',