From 27b77f93b5ea6b891ac2b4648dd8202cb6e089d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 23 Jun 2017 18:33:24 +0100 Subject: [PATCH] meson: build sid plugin https://bugzilla.gnome.org/show_bug.cgi?id=784135 --- ext/meson.build | 2 +- ext/sidplay/meson.build | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ext/sidplay/meson.build diff --git a/ext/meson.build b/ext/meson.build index 6c5a176..dc3536d 100644 --- a/ext/meson.build +++ b/ext/meson.build @@ -6,6 +6,6 @@ subdir('dvdread') subdir('lame') subdir('mpeg2dec') subdir('mpg123') -#subdir('sidplay') # FIXME +subdir('sidplay') subdir('twolame') subdir('x264') diff --git a/ext/sidplay/meson.build b/ext/sidplay/meson.build new file mode 100644 index 0000000..ebc2a2a --- /dev/null +++ b/ext/sidplay/meson.build @@ -0,0 +1,25 @@ +# sidplay plugin works with libsidplay 1.36.x (not 2.x.x) +have_sidplay = false +if add_languages('cpp') + cxx = meson.get_compiler('cpp') + + if cxx.has_header('sidplay/player.h') + sid_code = '''#include + void somefunc (void) { + sidTune tune = sidTune(0); + }''' + sidplay_dep = cxx.find_library('sidplay') + if sidplay_dep.found() + have_sidplay = cxx.compiles(sid_code, dependencies: sidplay_dep, name : 'sidplay') + endif + endif +endif + +if have_sidplay + shared_module('gstsid', 'gstsiddec.cc', + cpp_args : ugly_args, + include_directories : [configinc], + dependencies : [gstaudio_dep, sidplay_dep], + install : true, + install_dir : plugins_install_dir) +endif -- 2.7.4