summaryrefslogtreecommitdiff
path: root/src/fruits/cmv/meson.build
blob: a9eda61482b29b8a53a1ea43b921e74ba4185823 (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
33
34
35
36
37
38
39
40
41
42
43
44
cmv_src = ['cmv.c']
cmv_deps = [common_deps, desktop]
cmv_args = []
if get_option('sink-only')
  cmv_args += ['-DCAMU_SINK_ONLY']
else
  cmv_deps += [server]
endif

use_tui = false
if use_tui
  cmv_src += []
  cmv_deps += [notcurses]
endif

cmv_link_args = []
if is_android
  # https://github.com/google/ExoPlayer/issues/9933#issuecomment-1029775358
  cmv_link_args += ['-Wl,-Bsymbolic', '-static-libstdc++']
elif is_windows
  windows = import('windows')
  cmv_src += [windows.compile_resources('icon.rc')]
  if not is_msvc
    cmv_args += ['-mwindows', '-municode']
    cmv_link_args += ['-mwindows', '-municode', '-static', '-static-libgcc', '-static-libstdc++']
  endif
endif

install_data(join_paths(meson.source_root(), 'package/sink.desktop'), install_tag: 'xdg',
  install_dir: join_paths(get_option('datadir'), 'applications'))

foreach size: ['16x16', '32x32', '64x64', '128x128', '256x256']
  icon_dir = join_paths(get_option('datadir'), 'icons', 'hicolor', size, 'apps')
  install_data('sink-' + size + '.png', install_tag: 'xdg',
    install_dir: icon_dir, rename: 'sink.png')
endforeach

if is_android
  cmv_args += ['-DAPPLICATION_NAME="CTV"']
  shared_library('ctv', cmv_src, dependencies: cmv_deps, c_args: cmv_args, link_args: cmv_link_args)
else
  cmv_args += ['-DAPPLICATION_NAME="CMV"']
  executable('cmv', cmv_src, dependencies: cmv_deps, c_args: cmv_args, link_args: cmv_link_args, install: true)
endif