meson.build: move VERSION and others to Version.h

This commit is contained in:
Max Kellermann 2020-05-05 15:08:55 +02:00
parent 4e9fa36176
commit e0edf0b206
7 changed files with 13 additions and 4 deletions

View File

@ -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.') warning('Your clang version is too old. You need at least version 4.')
endif 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 = 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')) conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf'))
common_cppflags = [ common_cppflags = [

View File

@ -40,6 +40,7 @@
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/OptionDef.hxx" #include "util/OptionDef.hxx"
#include "util/OptionParser.hxx" #include "util/OptionParser.hxx"
#include "Version.h"
#ifdef _WIN32 #ifdef _WIN32
#include "system/Error.hxx" #include "system/Error.hxx"

View File

@ -21,6 +21,7 @@
#include "Log.hxx" #include "Log.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/StringStrip.hxx" #include "util/StringStrip.hxx"
#include "Version.h"
#include "config.h" #include "config.h"
#include <cassert> #include <cassert>

View File

@ -28,6 +28,7 @@
#include "net/SocketAddress.hxx" #include "net/SocketAddress.hxx"
#include "net/ToString.hxx" #include "net/ToString.hxx"
#include "Log.hxx" #include "Log.hxx"
#include "Version.h"
#include <cassert> #include <cassert>

View File

@ -27,6 +27,7 @@
#include "fs/Charset.hxx" #include "fs/Charset.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "Version.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -26,6 +26,7 @@
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include "Log.hxx" #include "Log.hxx"
#include "Version.h"
#include <mikmod.h> #include <mikmod.h>

View File

@ -36,6 +36,7 @@
#include "util/StringStrip.hxx" #include "util/StringStrip.hxx"
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include "util/CharUtil.hxx" #include "util/CharUtil.hxx"
#include "Version.h"
#include <curl/curl.h> #include <curl/curl.h>