config.h: conditionally define REMOTE_VIEWER_OS_ID

It should only be set in config.h if it is not the empty string

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-04-26 11:01:31 +01:00
parent d07b1e5bad
commit 65fe7379f8
2 changed files with 5 additions and 2 deletions

View File

@ -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@"

View File

@ -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('.')