From 4200caaf2298092d630315518a1780aa3337e744 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 17 Dec 2023 20:15:18 -0800 Subject: [PATCH] meson: add cmake variable handling Was left out of meson when adding Windows prebuilds. Fixes WrapDB erroring. Signed-off-by: Rosen Penev --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 107b247..b0e61fd 100644 --- a/meson.build +++ b/meson.build @@ -18,11 +18,19 @@ else endif libarchive_dep = dependency('libarchive') +vers = meson.project_version().split('.') +cdata = configuration_data() +cdata.set('PROJECT_VERSION', meson.project_version()) +cdata.set('PROJECT_VERSION_MAJOR', vers[0]) +cdata.set('PROJECT_VERSION_MINOR', vers[1]) +cdata.set('PROJECT_VERSION_PATCH', vers[2]) +cdata.set('QARCHIVE_STATIC', get_option('default_library') == 'static') + conf = configure_file( format: 'cmake@', input: 'other/cmake/config.h.in', output: 'config.h', - configuration: configuration_data({'QARCHIVE_STATIC': get_option('default_library') == 'static'}), + configuration: cdata, ) src = files(