Debian Codegraph @

podcasts-gtk/src/meson.build

raw ◀ ▶
1 Debian patch touch this file
1 global_conf = configuration_data()
2 global_conf.set_quoted('APP_ID', application_id)
3 global_conf.set_quoted('VERSION', podcasts_version + version_suffix)
4 global_conf.set_quoted('LOCALEDIR', podcasts_localedir)
5 # include_bytes! only takes a string literal
6 global_conf.set_quoted('RESOURCEFILE', podcasts_resources.full_path())
7 config_rs = configure_file(
8 input: 'config.rs.in',
9 output: 'config.rs',
10 configuration: global_conf
11 )
12
13 run_command(
14 'cp',
15 config_rs,
16 meson.current_source_dir(),
17 check: true
18 )
19
20 cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
21 cargo_options += [ '--target-dir', meson.project_build_root() / 'podcasts-gtk' / 'src' ]
22
23 if get_option('profile') == 'default'
24 cargo_options += [ '--release' ]
25 rust_target = 'release'
26 message('Building in release mode')
27 else
28 rust_target = 'debug'
29 message('Building in debug mode')
30 endif
31
32 cargo_release = custom_target('cargo-build',
33 build_by_default: true,
34 build_always_stale: true,
35 output: ['gnome-podcasts'],
36 install: true,
37 install_dir: podcasts_bindir,
38 console: true,
39 depends: podcasts_resources,
•40 command: [cargo, 'build',
41 cargo_options,
42 '&&',
•43 'cp', 'podcasts-gtk' / 'src' / get_option('host_arch') / rust_target / 'podcasts-gtk', '@OUTPUT@',
44 ])