From 65fe7379f85924b5bc3770fa9be5b08ba9a8704f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 26 Apr 2021 11:01:31 +0100 Subject: [PATCH] config.h: conditionally define REMOTE_VIEWER_OS_ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It should only be set in config.h if it is not the empty string Signed-off-by: Daniel P. Berrangé --- config.h.in | 2 +- meson.build | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.h.in b/config.h.in index eb4f03b..0af0fa4 100644 --- a/config.h.in +++ b/config.h.in @@ -25,7 +25,7 @@ #define PACKAGE_VERSION "@VERSION@" /* OS ID for this build */ -#define REMOTE_VIEWER_OS_ID "@OS_ID@" +#mesondefine REMOTE_VIEWER_OS_ID /* Version number of package */ #define VERSION "@VERSION@" diff --git a/meson.build b/meson.build index e5ed47b..2c92d75 100644 --- a/meson.build +++ b/meson.build @@ -478,7 +478,10 @@ if id != '' else conf_data.set('BUILDID', '') endif -conf_data.set('OS_ID', get_option('os-id')) +osid = get_option('os-id') +if osid != '' + conf_data.set('REMOTE_VIEWER_OS_ID', '"' + osid + '"') +endif arr_version = meson.project_version().split('.') -- 2.31.1