meson: move HTTP doc url generation to here

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-10-17 13:39:23 +10:00
parent 63f9923013
commit 61f81ec93e
2 changed files with 9 additions and 6 deletions

View file

@ -50,6 +50,15 @@ add_project_arguments(cppflags, language : 'cpp')
# config.h
config_h = configuration_data()
doc_url_base = 'https://wayland.freedesktop.org/libinput/doc'
if libinput_version[2].to_int() >= 90
doc_url = '@0@/latest'.format(doc_url_base)
else
doc_url = '@0@/@1@'.format(doc_url_base, meson.project_version())
endif
config_h.set_quoted('HTTP_DOC_LINK', doc_url)
config_h.set('_GNU_SOURCE', '1')
if get_option('buildtype') == 'debug' or get_option('buildtype') == 'debugoptimized'
config_h.set_quoted('MESON_BUILD_ROOT', meson.current_build_dir())

View file

@ -41,12 +41,6 @@
#include "libinput-util.h"
#include "libinput-version.h"
#if LIBINPUT_VERSION_MICRO >= 90
#define HTTP_DOC_LINK "https://wayland.freedesktop.org/libinput/doc/latest/"
#else
#define HTTP_DOC_LINK "https://wayland.freedesktop.org/libinput/doc/" LIBINPUT_VERSION "/"
#endif
struct libinput_source;
/* A coordinate pair in device coordinates */