diff --git a/meson.build b/meson.build index 3c870fc..752de2e 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,7 @@ subdir('src') executable('espeakup', espeakup_sources, + espeakup_version, include_directories : espeakup_incdir, dependencies : [thread_dep, espeak_dep, alsa_dep, m_dep], install : true) diff --git a/src/cli.c b/src/cli.c index b8a6543..280b507 100644 --- a/src/cli.c +++ b/src/cli.c @@ -23,6 +23,7 @@ #include #include "espeakup.h" +#include "version.h" /* pid path */ extern char *pidPath; diff --git a/src/include/espeakup.h b/src/include/espeakup.h index 9518c6d..d6daaf0 100644 --- a/src/include/espeakup.h +++ b/src/include/espeakup.h @@ -28,7 +28,6 @@ #include "queue.h" -#define PACKAGE_VERSION "0.81" #define PACKAGE_BUGREPORT "https://github.com/linux-speakup/espeakup/issues" enum espeakup_mode_t { diff --git a/src/include/meson.build b/src/include/meson.build new file mode 100644 index 0000000..3d65414 --- /dev/null +++ b/src/include/meson.build @@ -0,0 +1,2 @@ +espeakup_version = vcs_tag(input : 'version.h.in', + output : 'version.h') diff --git a/src/include/version.h.in b/src/include/version.h.in new file mode 100644 index 0000000..8c0038e --- /dev/null +++ b/src/include/version.h.in @@ -0,0 +1,25 @@ +/* + * espeakup - interface which allows speakup to use espeak + * + * Copyright (C) 2008 William Hubbs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __VERSION_H +#define __VERSION_H + +#define PACKAGE_VERSION "@VCS_TAG@" + +#endif diff --git a/src/meson.build b/src/meson.build index f3de06b..e90332e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,4 +1,7 @@ espeakup_incdir = include_directories('include') + +subdir('include') + espeakup_sources = files([ 'cli.c', 'espeak.c',