summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-05-05 15:08:55 +0200
committerMax Kellermann <max@musicpd.org>2020-05-05 15:12:11 +0200
commite0edf0b206549f68a03d69c2ba5b4cd3d4105a1f (patch)
tree6cf8f08ca0743e7b6b8ecab67ec63c8d1c163c7c
parent4e9fa36176ac3a8c9d2acf68f7ec0931d8350a09 (diff)
meson.build: move VERSION and others to Version.h
-rw-r--r--meson.build11
-rw-r--r--src/CommandLine.cxx1
-rw-r--r--src/LogBackend.cxx1
-rw-r--r--src/client/New.cxx1
-rw-r--r--src/db/plugins/simple/DatabaseSave.cxx1
-rw-r--r--src/decoder/plugins/MikmodDecoderPlugin.cxx1
-rw-r--r--src/lib/curl/Request.cxx1
7 files changed, 13 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index d1ff992c3..c4ba8a8c6 100644
--- a/meson.build
+++ b/meson.build
@@ -21,11 +21,14 @@ elif compiler.get_id() == 'clang' and compiler.version().version_compare('<4')
warning('Your clang version is too old. You need at least version 4.')
endif
+version_conf = configuration_data()
+version_conf.set_quoted('PACKAGE', meson.project_name())
+version_conf.set_quoted('PACKAGE_NAME', meson.project_name())
+version_conf.set_quoted('VERSION', meson.project_version())
+version_conf.set_quoted('PROTOCOL_VERSION', '0.22.0')
+configure_file(output: 'Version.h', configuration: version_conf)
+
conf = configuration_data()
-conf.set_quoted('PACKAGE', meson.project_name())
-conf.set_quoted('PACKAGE_NAME', meson.project_name())
-conf.set_quoted('VERSION', meson.project_version())
-conf.set_quoted('PROTOCOL_VERSION', '0.22.0')
conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf'))
common_cppflags = [
diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx
index 1a733699b..06a4d63a3 100644
--- a/src/CommandLine.cxx
+++ b/src/CommandLine.cxx
@@ -40,6 +40,7 @@
#include "util/Domain.hxx"
#include "util/OptionDef.hxx"
#include "util/OptionParser.hxx"
+#include "Version.h"
#ifdef _WIN32
#include "system/Error.hxx"
diff --git a/src/LogBackend.cxx b/src/LogBackend.cxx
index 178b9cd92..f6395a54f 100644
--- a/src/LogBackend.cxx
+++ b/src/LogBackend.cxx
@@ -21,6 +21,7 @@
#include "Log.hxx"
#include "util/Domain.hxx"
#include "util/StringStrip.hxx"
+#include "Version.h"
#include "config.h"
#include <cassert>
diff --git a/src/client/New.cxx b/src/client/New.cxx
index b12ec4146..b7023f87a 100644
--- a/src/client/New.cxx
+++ b/src/client/New.cxx
@@ -28,6 +28,7 @@
#include "net/SocketAddress.hxx"
#include "net/ToString.hxx"
#include "Log.hxx"
+#include "Version.h"
#include <cassert>
diff --git a/src/db/plugins/simple/DatabaseSave.cxx b/src/db/plugins/simple/DatabaseSave.cxx
index 2d0c77984..3fe9d1a5c 100644
--- a/src/db/plugins/simple/DatabaseSave.cxx
+++ b/src/db/plugins/simple/DatabaseSave.cxx
@@ -27,6 +27,7 @@
#include "fs/Charset.hxx"
#include "util/StringCompare.hxx"
#include "util/RuntimeError.hxx"
+#include "Version.h"
#include <string.h>
#include <stdlib.h>
diff --git a/src/decoder/plugins/MikmodDecoderPlugin.cxx b/src/decoder/plugins/MikmodDecoderPlugin.cxx
index 397359d62..2dc1fb0bf 100644
--- a/src/decoder/plugins/MikmodDecoderPlugin.cxx
+++ b/src/decoder/plugins/MikmodDecoderPlugin.cxx
@@ -26,6 +26,7 @@
#include "util/RuntimeError.hxx"
#include "util/StringView.hxx"
#include "Log.hxx"
+#include "Version.h"
#include <mikmod.h>
diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx
index 5051d4d16..7189864c7 100644
--- a/src/lib/curl/Request.cxx
+++ b/src/lib/curl/Request.cxx
@@ -36,6 +36,7 @@
#include "util/StringStrip.hxx"
#include "util/StringView.hxx"
#include "util/CharUtil.hxx"
+#include "Version.h"
#include <curl/curl.h>