meson.build 2.4 KB
Newer Older
Jordan Petridis's avatar
Jordan Petridis committed
1
project(
2
  'gnome-podcasts', 'rust',
Jordan Petridis's avatar
Jordan Petridis committed
3
  version: '0.4.6',
Jordan Petridis's avatar
Jordan Petridis committed
4 5 6
  license: 'GPLv3',
)

7 8 9 10 11 12 13
dependency('sqlite3', version: '>= 3.20')
dependency('openssl', version: '>= 1.0')
dependency('dbus-1')

dependency('glib-2.0', version: '>= 2.56')
dependency('gio-2.0', version: '>= 2.56')
dependency('gdk-pixbuf-2.0')
14
dependency('gtk+-3.0', version: '>= 3.24.7')
15
dependency('libhandy-0.0', version: '>= 0.0.9')
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

dependency('gstreamer-1.0', version: '>= 1.12')
dependency('gstreamer-base-1.0', version: '>= 1.12')
dependency('gstreamer-audio-1.0', version: '>= 1.12')
dependency('gstreamer-video-1.0', version: '>= 1.12')
dependency('gstreamer-player-1.0', version: '>= 1.12')
dependency('gstreamer-plugins-base-1.0', version: '>= 1.12')
dependency('gstreamer-plugins-bad-1.0', version: '>= 1.12')
dependency('gstreamer-bad-audio-1.0', version: '>= 1.12')

cargo = find_program('cargo', required: true)
gresource = find_program('glib-compile-resources', required: true)
gschemas = find_program('glib-compile-schemas', required: true)
cargo_vendor = find_program('cargo-vendor', required: false)

31
if get_option('profile') == 'development'
32
  profile = '.Devel'
33 34 35 36 37 38 39 40 41 42 43 44 45
  vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
  if vcs_tag == ''
    version_suffix = '-devel'
  else
    version_suffix = '-@0@'.format (vcs_tag)
  endif
else
  profile = ''
  version_suffix = ''
endif

application_id = 'org.gnome.Podcasts@0@'.format(profile)
i18n = import('i18n')
46
gnome = import('gnome')
47 48 49 50

subdir('podcasts-gtk/po')
podir = join_paths (meson.source_root (), 'podcasts-gtk', 'po')

51
podcasts_version = meson.project_version()
Jordan Petridis's avatar
Jordan Petridis committed
52

53 54
podcasts_prefix = get_option('prefix')
podcasts_bindir = join_paths(podcasts_prefix, get_option('bindir'))
55
podcasts_localedir = join_paths(podcasts_prefix, get_option('localedir'))
Jordan Petridis's avatar
Jordan Petridis committed
56

57
podcasts_conf = configuration_data()
58 59
podcasts_conf.set('appid', application_id)
podcasts_conf.set('bindir', podcasts_bindir)
Zander Brown's avatar
Zander Brown committed
60

61
datadir = get_option('datadir')
62
subdir('podcasts-gtk/resources')
Jordan Petridis's avatar
Jordan Petridis committed
63 64

cargo_script = find_program('scripts/cargo.sh')
65
test_script = find_program('scripts/test.sh')
66

67 68
subdir('podcasts-data/src')
subdir('podcasts-downloader/src')
69
subdir('podcasts-gtk/src')
Jordan Petridis's avatar
Jordan Petridis committed
70

71 72 73 74 75
meson.add_dist_script(
  'scripts/dist-vendor.sh',
  meson.source_root(),
  join_paths(meson.build_root(), 'meson-dist', meson.project_name() + '-' + podcasts_version)
)
76 77 78 79

test(
  'cargo-test',
  test_script,
80
  args: meson.build_root(),
81 82 83
  workdir: meson.source_root(),
  timeout: 3000
)