meson.build 1.61 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
decklink_sources = [
  'gstdecklink.cpp',
  'gstdecklinkaudiosink.cpp',
  'gstdecklinkvideosink.cpp',
  'gstdecklinkaudiosrc.cpp',
  'gstdecklinkvideosrc.cpp',
]

build_decklink = false
decklink_ldflags = []
11
decklink_libs = []
12

13
14
15
16
17
18
if host_machine.system() == 'windows'
  decklink_sources += ['win/DeckLinkAPIDispatch.cpp', 'win/DeckLinkAPI_i.c']
  # Only used by MSVC. On MinGW, this is all inlined.
  # FIXME: Use commsuppwd.lib for debug builds?
  comutil_dep = cxx.find_library('comsuppw', required : false)
  if comutil_dep.found()
19
    build_decklink = true
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    decklink_libs = [comutil_dep]
  endif
else
  libdl = cc.find_library('dl', required: false)
  have_pthread_h = cdata.has('HAVE_PTHREAD_H')
  if libdl.found() and have_pthread_h
    decklink_libs = [libm, libdl, dependency('threads')]
    if host_machine.system() == 'linux'
      decklink_sources += ['linux/DeckLinkAPIDispatch.cpp']
      build_decklink = true
    elif host_machine.system() == 'darwin'
      decklink_sources += ['osx/DeckLinkAPIDispatch.cpp']
      decklink_ldflags = ['-Wl,-framework,CoreFoundation']
      build_decklink = true
    endif
35
36
37
38
  endif
endif

if build_decklink
39
  message('Building decklink plugin')
40
  decklink = library('gstdecklink',
41
42
43
44
    decklink_sources,
    cpp_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ],
    link_args : decklink_ldflags + noseh_link_args,
    include_directories : [configinc],
45
    dependencies : [gstvideo_dep, gstaudio_dep, gstbase_dep, gst_dep] + decklink_libs,
46
47
48
    install : true,
    install_dir : plugins_install_dir,
  )
49
50
else
  message('Not building decklink plugin for "@0@'.format(host_machine.system()))
51
endif