Debian Codegraph @

podcasts-gtk/src/meson.build

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
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_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
33
34 cargo_release = custom_target('cargo-build',
35 build_by_default: true,
36 build_always_stale: true,
37 output: ['gnome-podcasts'],
38 install: true,
39 install_dir: podcasts_bindir,
40 console: true,
41 depends: podcasts_resources,
42 command: ['env',
43 cargo_env,
44 cargo, 'build',
45 cargo_options,
46 '&&',
47 'cp', 'podcasts-gtk' / 'src' / rust_target / 'podcasts-gtk', '@OUTPUT@',
48 ])