summaryrefslogtreecommitdiff
path: root/ext/sidplay/meson.build
blob: 778193829171d9f1ef0cd55617e46e291a76f9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# sidplay plugin works with libsidplay 1.36.x (not 2.x.x)
have_sidplay = false
if add_languages('cpp')
  extra_args = []
  cxx = meson.get_compiler('cpp')
  if cxx.has_argument('-fvisibility=hidden')
    extra_args += ['-fvisibility=hidden']
  endif
  if cxx.has_argument('-fno-strict-aliasing')
    extra_args += ['-fno-strict-aliasing']
  endif

  if cxx.has_header('sidplay/player.h')
    sid_code = '''#include <sidplay/player.h>
                  void somefunc (void) {
                    sidTune tune = sidTune(0);
                  }'''
    sidplay_dep = cxx.find_library('sidplay', required: false)
    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 + extra_args,
    include_directories : [configinc],
    dependencies : [gstaudio_dep, sidplay_dep],
    install : true,
    install_dir : plugins_install_dir)
endif