Merging gst-plugins-ugly
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-ugly / ext / sidplay / meson.build
1 sidplay_option = get_option('sidplay')
2 if sidplay_option.disabled()
3   subdir_done()
4 endif
5
6 if not add_languages('cpp', native: false, required: sidplay_option)
7   subdir_done()
8 endif
9
10 if not cxx.has_header('sidplay/player.h', required: sidplay_option)
11   subdir_done()
12 endif
13
14 sidplay_dep = cxx.find_library('sidplay', required: sidplay_option)
15 if not sidplay_dep.found()
16   subdir_done()
17 endif
18
19 # sidplay plugin works with libsidplay 1.36.x (not 2.x.x)
20 sid_code = '''#include <sidplay/player.h>
21               void somefunc (void) {
22                 sidTune tune = sidTune(0);
23               }'''
24 if not cxx.compiles(sid_code, dependencies: sidplay_dep, name : 'sidplay usage')
25   if sidplay_option.enabled()
26     error('sidplay headers and libraries were found, but were not usable')
27   endif
28   subdir_done()
29 endif
30
31 gstsid = library('gstsid', 'gstsiddec.cc',
32   cpp_args : ugly_args,
33   include_directories : [configinc],
34   dependencies : [gstaudio_dep, sidplay_dep],
35   install : true,
36   install_dir : plugins_install_dir)
37 pkgconfig.generate(gstsid, install_dir : plugins_pkgconfig_install_dir)
38 plugins += [gstsid]