summaryrefslogtreecommitdiff
path: root/src/lib/alsa
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-29 17:12:55 +0100
committerMax Kellermann <max@musicpd.org>2018-10-14 23:41:38 +0200
commit94592c14062d5afc9482d11baa401648082022c0 (patch)
tree8723d462737f883181fb1aaa3f91ee3d0add9721 /src/lib/alsa
parent13ce142df137f346526de2a31a7ccbd59a903cdd (diff)
build with Meson instead of autotools
So long, autotools! This is my last MPD related project to migrate away from it. It has its strengths, but also very obvious weaknesses and weirdnesses. Today, many of its quirks are not needed anymore, and are cumbersome and slow. Now welcome our new Meson overlords!
Diffstat (limited to 'src/lib/alsa')
-rw-r--r--src/lib/alsa/meson.build31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/alsa/meson.build b/src/lib/alsa/meson.build
new file mode 100644
index 000000000..cf47a012b
--- /dev/null
+++ b/src/lib/alsa/meson.build
@@ -0,0 +1,31 @@
+if not is_linux
+ alsa_dep = dependency('', required: false)
+ subdir_done()
+endif
+
+libasound_dep = dependency('alsa', version: '>= 0.9.0', required: get_option('alsa'))
+if not libasound_dep.found()
+ alsa_dep = dependency('', required: false)
+ subdir_done()
+endif
+
+conf.set('ENABLE_ALSA', true)
+
+alsa = static_library(
+ 'alsa',
+ 'Version.cxx',
+ 'AllowedFormat.cxx',
+ 'HwSetup.cxx',
+ 'NonBlock.cxx',
+ include_directories: inc,
+ dependencies: [
+ libasound_dep,
+ ],
+)
+
+alsa_dep = declare_dependency(
+ link_with: alsa,
+ dependencies: [
+ event_dep,
+ ],
+)