From 9775485acb10cad69a498ebd502ef56beb595b8d Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Thu, 10 Aug 2023 12:13:21 +0200 Subject: [PATCH] add meson support for eased cross-compilation In the past I mostly cross-compiled frozen from hand and copy-pasted it inside the needed application. This patch adds a meson build definition, which already has builtin cross-compilation support. My aim is to use this in cross-compiled NixOS pkgs as a dependency without copy-paste and manual cross-compilation. Signed-off-by: Markus Theil --- meson.build | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..2d00e86 --- /dev/null +++ b/meson.build @@ -0,0 +1,25 @@ +project( + 'frozen', + 'c', + default_options: [ + 'c_args=-Wextra -fno-builtin -pedantic', + 'c_std=c99', + 'werror=true' + ], + license: 'Apache-2.0', + version: '1.7' +) + +libfrozen = library( + 'frozen', + 'frozen.c', + install: true +) +install_headers('frozen.h') + +unit_test = executable('unit_test', + 'unit_test.c', + dependencies: [libfrozen] +) +test('Frozen Unit Test', unit_test) +