Tim-Philipp Müller | 443542b | 2018-12-16 17:01:03 +0000 | [diff] [blame] | 1 | project ('tinyalsa', 'c', |
Alexandru N. Onea | a6838a0 | 2019-04-10 01:00:58 +0300 | [diff] [blame^] | 2 | version : run_command(find_program('scripts/version.sh'), 'print', '-s').stdout().strip(), |
Tim-Philipp Müller | 443542b | 2018-12-16 17:01:03 +0000 | [diff] [blame] | 3 | meson_version : '>= 0.48.0') |
Tim-Philipp Müller | 4b50f5b | 2016-04-09 23:53:26 +0100 | [diff] [blame] | 4 | |
| 5 | tinyalsa_includes = include_directories('.', 'include') |
| 6 | |
| 7 | tinyalsa = library('tinyalsa', |
| 8 | 'src/mixer.c', 'src/pcm.c', |
| 9 | include_directories: tinyalsa_includes, |
Tim-Philipp Müller | 443542b | 2018-12-16 17:01:03 +0000 | [diff] [blame] | 10 | version: meson.project_version(), |
Tim-Philipp Müller | 4b50f5b | 2016-04-09 23:53:26 +0100 | [diff] [blame] | 11 | install: true) |
| 12 | |
Alexandru N. Onea | a6838a0 | 2019-04-10 01:00:58 +0300 | [diff] [blame^] | 13 | log_version = run_command(find_program('scripts/version.sh'), 'check') |
Alexandru N. Onea | 52a7957 | 2019-04-09 21:51:27 +0300 | [diff] [blame] | 14 | if log_version.returncode() != 0 |
| 15 | error(log_version.stderr()) |
| 16 | endif |
| 17 | |
| 18 | message(log_version.stdout()) |
| 19 | |
Tim-Philipp Müller | 4b50f5b | 2016-04-09 23:53:26 +0100 | [diff] [blame] | 20 | # For use as a Meson subproject |
| 21 | tinyalsa_dep = declare_dependency(link_with: tinyalsa, |
| 22 | include_directories: include_directories('include')) |
| 23 | |
| 24 | if not get_option('docs').disabled() |
| 25 | # subdir('docs') # FIXME |
| 26 | endif |
| 27 | |
| 28 | if not get_option('examples').disabled() |
| 29 | subdir('examples') |
| 30 | endif |
| 31 | |
| 32 | subdir('include/tinyalsa') |
| 33 | |
| 34 | if not get_option('utils').disabled() |
| 35 | subdir('utils') |
| 36 | endif |
| 37 | |
| 38 | pkg = import('pkgconfig') |
| 39 | pkg.generate(tinyalsa, description: 'TinyALSA Library') |