summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build144
1 files changed, 1 insertions, 143 deletions
diff --git a/meson.build b/meson.build
index 9b409691..072a1e90 100644
--- a/meson.build
+++ b/meson.build
@@ -325,149 +325,7 @@ endif
############ documentation ############
if get_option('documentation')
- doxygen = find_program('doxygen', required : false)
- if not doxygen.found()
- error('Program "doxygen" not found or not executable. Try building with -Ddocumentation=false')
- endif
- dot = find_program('dot', required : false)
- if not dot.found()
- error('Program "dot" not found or not executable. Try building with -Ddocumentation=false')
- endif
-
- doxygen_version_cmd = run_command(doxygen.path(), '--version')
- if doxygen_version_cmd.returncode() != 0
- error('Command "doxygen --version" failed.')
- endif
- doxygen_version = doxygen_version_cmd.stdout()
- if doxygen_version.version_compare('< 1.8.3')
- error('doxygen needs to be at least version 1.8.3 (have @0@)'.format(doxygen_version))
- endif
- grep = find_program('grep')
- dot_version_cmd = run_command(dot.path(), '-V')
- if dot_version_cmd.returncode() != 0
- error('Command "dot -V" failed.')
- endif
- # dot -V output is (to stderr):
- # dot - graphviz version 2.38.0 (20140413.2041)
- dot_version = dot_version_cmd.stderr().split(' ')[4]
- if dot_version.version_compare('< 2.26')
- error('Graphviz dot needs to be at least version 2.26 (have @0@)'.format(dot_version))
- endif
-
- readme = vcs_tag(command : ['git', 'log', '-1', '--format=%h'],
- fallback : 'unknown',
- input : 'README.md',
- output : 'README.md',
- replace_string: '__GIT_VERSION__')
-
- src_doxygen = files(
- # source files
- 'src/libinput.h',
- # written docs
- 'doc/absolute-axes.dox',
- 'doc/absolute-coordinate-ranges.dox',
- 'doc/architecture.dox',
- 'doc/building.dox',
- 'doc/button_debouncing.dox',
- 'doc/clickpad-softbuttons.dox',
- 'doc/contributing.dox',
- 'doc/device-configuration-via-udev.dox',
- 'doc/device-quirks.dox',
- 'doc/faqs.dox',
- 'doc/gestures.dox',
- 'doc/middle-button-emulation.dox',
- 'doc/normalization-of-relative-motion.dox',
- 'doc/palm-detection.dox',
- 'doc/page-hierarchy.dox',
- 'doc/pointer-acceleration.dox',
- 'doc/reporting-bugs.dox',
- 'doc/scrolling.dox',
- 'doc/seats.dox',
- 'doc/switches.dox',
- 'doc/t440-support.dox',
- 'doc/tablet-support.dox',
- 'doc/tapping.dox',
- 'doc/test-suite.dox',
- 'doc/timestamps.dox',
- 'doc/tools.dox',
- 'doc/touchpad-jumping-cursors.dox',
- 'doc/touchpad-pressure.dox',
- 'doc/touchpad-jitter.dox',
- 'doc/touchpads.dox',
- 'doc/trackpoints.dox',
- 'doc/what-is-libinput.dox',
- # dot drawings
- 'doc/dot/seats-sketch.gv',
- 'doc/dot/seats-sketch-libinput.gv',
- 'doc/dot/libinput-stack-wayland.gv',
- 'doc/dot/libinput-stack-xorg.gv',
- 'doc/dot/libinput-stack-gnome.gv',
- 'doc/dot/evemu.gv',
- # svgs
- 'doc/svg/button-debouncing-wave-diagram.svg',
- 'doc/svg/button-scrolling.svg',
- 'doc/svg/clickfinger.svg',
- 'doc/svg/clickfinger-distance.svg',
- 'doc/svg/edge-scrolling.svg',
- 'doc/svg/gesture-2fg-ambiguity.svg',
- 'doc/svg/palm-detection.svg',
- 'doc/svg/pinch-gestures.svg',
- 'doc/svg/pinch-gestures-softbuttons.svg',
- 'doc/svg/ptraccel-linear.svg',
- 'doc/svg/ptraccel-low-dpi.svg',
- 'doc/svg/ptraccel-touchpad.svg',
- 'doc/svg/ptraccel-trackpoint.svg',
- 'doc/svg/software-buttons.svg',
- 'doc/svg/swipe-gestures.svg',
- 'doc/svg/tablet-axes.svg',
- 'doc/svg/tablet-cintiq24hd-modes.svg',
- 'doc/svg/tablet-interfaces.svg',
- 'doc/svg/tablet-intuos-modes.svg',
- 'doc/svg/tablet-left-handed.svg',
- 'doc/svg/tablet-out-of-bounds.svg',
- 'doc/svg/tablet.svg',
- 'doc/svg/tap-n-drag.svg',
- 'doc/svg/thumb-detection.svg',
- 'doc/svg/top-software-buttons.svg',
- 'doc/svg/touchscreen-gestures.svg',
- 'doc/svg/twofinger-scrolling.svg',
- # style files
- 'doc/style/header.html',
- 'doc/style/footer.html',
- 'doc/style/customdoxygen.css',
- 'doc/style/bootstrap.css',
- 'doc/style/libinputdoxygen.css',
- )
-
- # doxygen expects a space-separated list of input files in its
- # doxyfile so we build a new list containing all full paths
- # and merge it with ' '.join() later
- doxy_input_files = []
- foreach f : src_doxygen
- doxy_input_files += [join_paths(meson.source_root(), '@0@'.format(f))]
- endforeach
-
- doxy_input_files += [readme.full_path()]
-
- doc_config = configuration_data()
- doc_config.set('PACKAGE_NAME', meson.project_name())
- doc_config.set('PACKAGE_VERSION', meson.project_version())
- doc_config.set('top_srcdir', meson.source_root())
- doc_config.set('INPUT', ' '.join(doxy_input_files))
- doc_config.set('README_MD', readme.full_path())
-
- doxyfile = configure_file(input : 'doc/libinput.doxygen.in',
- output : 'libinput.doxygen',
- configuration : doc_config,
- install : false)
-
- custom_target('doxygen',
- input : [ doxyfile, readme ] + src_doxygen,
- output : [ 'Documentation' ],
- command : [ doxygen, doxyfile ],
- install : false,
- build_by_default : true)
-
+ subdir('doc')
endif
############ tools ############