meson: Move oss-util in a library
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Mon, 26 Nov 2018 09:29:12 +0000 (16:29 +0700)
committerArun Raghavan <arun@arunraghavan.net>
Sat, 8 Jun 2019 09:57:00 +0000 (11:57 +0200)
Like it was with the aututools

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
src/modules/meson.build
src/modules/oss/meson.build [new file with mode: 0644]

index 774f8904d8e89d8d635377e04afc658c06e102f5..008ba38bc425d469ed17fd9fc054b3d603210883 100644 (file)
@@ -77,8 +77,9 @@ if cc.has_header('linux/input.h')
 endif
 
 if cc.has_header('sys/soundcard.h')
+  subdir('oss')
   all_modules += [
-    [ 'module-oss', [ 'oss/module-oss.c', 'oss/oss-util.c', 'oss/oss-util.h' ] ],
+    [ 'module-oss', 'oss/module-oss.c', [], [], [], liboss_util ],
   ]
 endif
 
diff --git a/src/modules/oss/meson.build b/src/modules/oss/meson.build
new file mode 100644 (file)
index 0000000..3e9603c
--- /dev/null
@@ -0,0 +1,17 @@
+liboss_util_sources = [
+  'oss-util.c'
+]
+
+liboss_util_headers = [
+  'oss-util.h'
+]
+
+liboss_util = shared_library('oss-util',
+  liboss_util_sources,
+  liboss_util_headers,
+  c_args : [pa_c_args, server_c_args],
+  include_directories : [configinc, topinc],
+  dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep],
+  install : true,
+  install_dir : modlibexecdir,
+)