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 | |
Bhalchandra Gajare | 986b8e3 | 2019-09-04 15:32:35 -0700 | [diff] [blame] | 7 | cc = meson.get_compiler('c') |
| 8 | |
| 9 | # Dependency on libdl |
| 10 | dl_dep = cc.find_library('dl') |
| 11 | |
Tim-Philipp Müller | 4b50f5b | 2016-04-09 23:53:26 +0100 | [diff] [blame] | 12 | tinyalsa = library('tinyalsa', |
Bhalchandra Gajare | e7c627d | 2019-06-19 15:30:42 -0700 | [diff] [blame] | 13 | 'src/mixer.c', 'src/pcm.c', 'src/pcm_hw.c', 'src/pcm_plugin.c', 'src/snd_card_plugin.c', 'src/mixer_hw.c', 'src/mixer_plugin.c', |
Tim-Philipp Müller | 4b50f5b | 2016-04-09 23:53:26 +0100 | [diff] [blame] | 14 | include_directories: tinyalsa_includes, |
Tim-Philipp Müller | 443542b | 2018-12-16 17:01:03 +0000 | [diff] [blame] | 15 | version: meson.project_version(), |
Bhalchandra Gajare | 986b8e3 | 2019-09-04 15:32:35 -0700 | [diff] [blame] | 16 | install: true, |
| 17 | dependencies: dl_dep) |
Tim-Philipp Müller | 4b50f5b | 2016-04-09 23:53:26 +0100 | [diff] [blame] | 18 | |
Tim-Philipp Müller | 4b50f5b | 2016-04-09 23:53:26 +0100 | [diff] [blame] | 19 | # For use as a Meson subproject |
| 20 | tinyalsa_dep = declare_dependency(link_with: tinyalsa, |
| 21 | include_directories: include_directories('include')) |
| 22 | |
| 23 | if not get_option('docs').disabled() |
| 24 | # subdir('docs') # FIXME |
| 25 | endif |
| 26 | |
| 27 | if not get_option('examples').disabled() |
| 28 | subdir('examples') |
| 29 | endif |
| 30 | |
| 31 | subdir('include/tinyalsa') |
| 32 | |
| 33 | if not get_option('utils').disabled() |
| 34 | subdir('utils') |
| 35 | endif |
| 36 | |
| 37 | pkg = import('pkgconfig') |
| 38 | pkg.generate(tinyalsa, description: 'TinyALSA Library') |