From ce2c37356c674e5893f80786616355b4659b43ad Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 4 Apr 2025 03:12:26 +0300 Subject: Convert from make to meson Meson makes cross compilation easier. Replace the make-based build system with meson. Signed-off-by: Laurent Pinchart --- meson.build | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 meson.build (limited to 'meson.build') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..026bc0d --- /dev/null +++ b/meson.build @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: CC0-1.0 + +project('vsp-tests', 'c', + meson_version : '>= 0.60', + version : '0.0.0', + default_options : [ + 'werror=true', + 'warning_level=2', + ], + license : 'GPL 2.0+') + +# +# Configure the build environment +# +cc = meson.get_compiler('c') + +cc_arguments = [ + '-Wno-unused-parameter', +] + +if cc.get_id() == 'clang' + # Turn _FORTIFY_SOURCE by default on optimised builds (as it requires -O1 + # or higher). This is needed on clang only as gcc enables it by default. + if get_option('optimization') != '0' + cc_arguments += [ + '-D_FORTIFY_SOURCE=2', + ] + endif +endif + +add_project_arguments(cc_arguments, language : 'c') + +subdir('data') +subdir('scripts') +subdir('src') +subdir('tests') -- cgit v1.2.3