diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2021-07-29 23:27:11 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-09-07 10:55:43 +0000 |
commit | 77d1c243614d385027ca11f75aa5d688b01c2969 (patch) | |
tree | dc39670de7b80b887f539480153334c25ea75e88 /libqcdm | |
parent | fa19b2b9b1412d3eeb515afe41c55ac414acc982 (diff) |
build: Port to meson
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
Diffstat (limited to 'libqcdm')
-rw-r--r-- | libqcdm/src/meson.build | 33 | ||||
-rw-r--r-- | libqcdm/tests/meson.build | 42 |
2 files changed, 75 insertions, 0 deletions
diff --git a/libqcdm/src/meson.build b/libqcdm/src/meson.build new file mode 100644 index 00000000..8ea4d005 --- /dev/null +++ b/libqcdm/src/meson.build @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com> + +libqcdm_inc = include_directories('.') + +sources = files( + 'com.c', + 'commands.c', + 'errors.c', + 'logs.c', + 'result.c', + 'utils.c', +) + +libqcdm = static_library( + 'qcdm', + sources: sources, + include_directories: top_inc, + dependencies: glib_deps, +) + +libqcdm_dep = declare_dependency( + include_directories: libqcdm_inc, + link_with: libqcdm, +) + +# FIXME: Created following autotools but actually unused +libqcdm_test = static_library( + 'qcdm-test', + sources: 'utils.c', + include_directories: top_inc, + dependencies: glib_deps, +) diff --git a/libqcdm/tests/meson.build b/libqcdm/tests/meson.build new file mode 100644 index 00000000..e2a3a858 --- /dev/null +++ b/libqcdm/tests/meson.build @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com> + +test_units = [ + ['ipv6pref', files('ipv6pref.c'), false], + ['modepref', files('modepref.c'), false], + ['reset', files('reset.c'), false], +] + +sources = files( + 'test-qcdm.c', + 'test-qcdm-com.c', + 'test-qcdm-crc.c', + 'test-qcdm-escaping.c', + 'test-qcdm-result.c', + 'test-qcdm-utils.c', +) + +test_units += [['test-qcdm', sources, true]] + +incs = [ + top_inc, + libqcdm_inc, +] + +deps = [ + glib_deps, + libqcdm_dep, +] + +foreach test_unit: test_units + exe = executable( + test_unit[0], + test_unit[1], + include_directories: incs, + dependencies: deps, + ) + + if test_unit[2] + test(test_unit[0], exe) + endif +endforeach |