diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-27 11:09:37 -0400 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-03-30 13:11:42 +0200 |
commit | ade1de1564dc4bd9dc72a545f368bed8481c55d8 (patch) | |
tree | a3b6b83c623c87aa374e97ccf656944434ced941 | |
parent | 0722d76e952880f80a7f8f04aaa8446839d138d3 (diff) |
build: Add meson support
This will allow using the xdgmime test programs as a meson subproject.
-rw-r--r-- | meson.build | 17 | ||||
-rw-r--r-- | src/meson.build | 35 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..2b16fda --- /dev/null +++ b/meson.build @@ -0,0 +1,17 @@ +project('xdgmime', 'c', + version: '0.0', + default_options: ['c_std=c99', 'warning_level=1', 'debug=true'], + meson_version: '>=0.48.0', +) + +add_project_arguments( + '-D_POSIX_C_SOURCE=200809L', + '-DXDG_PREFIX=xdg_test', + '-DHAVE_MMAP', + '-Wmissing-prototypes', + '-Wno-sign-compare', + language: 'c', + native: true, +) + +subdir('src') diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..ceb407c --- /dev/null +++ b/src/meson.build @@ -0,0 +1,35 @@ +libcommon = static_library('common', + 'xdgmime.c', + 'xdgmimeglob.c', + 'xdgmimeint.c', + 'xdgmimemagic.c', + 'xdgmimealias.c', + 'xdgmimeparent.c', + 'xdgmimecache.c', + 'xdgmimeicon.c', + native: true, +) + +test_mime = executable('test-mime', + 'test-mime.c', + link_with: libcommon, + native: true, + install: false, +) +meson.override_find_program('test-mime', test_mime) + +test_mime_data = executable('test-mime-data', + 'test-mime-data.c', + link_with: libcommon, + native: true, + install: false, +) +meson.override_find_program('test-mime-data', test_mime_data) + +print_mime_data = executable('print-mime-data', + 'print-mime-data.c', + link_with: libcommon, + native: true, + install: false, +) +meson.override_find_program('print-mime-data', print_mime_data) |