'pdns',
['c', 'cpp'],
# version: 4.7.0, # TODO This should call builder-support/gen-version
- # license_files: 'LICENse', # TODO Meson 1.1.0
+ # license_files: 'LICENSE', # TODO Meson 1.1.0
meson_version: '>= 0.53',
default_options: [
'buildtype=debugoptimized',
conf = configuration_data()
deps = []
+subdir('meson/version') # Generate version define
subdir('meson/compiler-setup') # Common compiler setup (cxx is the C++ compiler)
subdir('meson/summary') # Print a system/project summary
subdir('meson/timet-size') # Check the size of time_t
--- /dev/null
+# Generate version define
+# Inputs: conf
+
+# TODO Find a way to fix these ../.. because meson.current_source_dir() returns
+# $GIT_ROOT/meson/version. Meson 0.56 introduces meson.project_source_root().
+gen_version_prog = find_program('gen-version', dirs: meson.current_source_dir() / '..' / '..' / 'builder-support', required: true)
+gen_version_prog_res = run_command(gen_version_prog, check: true)
+version = gen_version_prog_res.stdout().strip()
+conf.set_quoted('VERSION', version, description: 'Version')