musicus/src/meson.build

133 lines
3 KiB
Meson
Raw Normal View History

prefix = get_option('prefix')
localedir = join_paths(prefix, get_option('localedir'))
global_conf = configuration_data()
global_conf.set_quoted('LOCALEDIR', localedir)
2020-11-08 00:16:56 +01:00
global_conf.set_quoted('VERSION', meson.project_version())
config_rs = configure_file(
input: 'config.rs.in',
output: 'config.rs',
configuration: global_conf
)
run_command(
'cp',
config_rs,
meson.current_source_dir(),
check: true
)
2020-11-01 17:37:04 +01:00
resource_conf = configuration_data()
resource_conf.set_quoted('RESOURCEFILE', resources.full_path())
resource_rs = configure_file(
input: 'resources.rs.in',
output: 'resources.rs',
configuration: resource_conf
)
run_command(
'cp',
resource_rs,
meson.current_source_dir(),
check: true
)
sources = files(
2020-11-29 00:12:23 +01:00
'backend/client/ensembles.rs',
'backend/client/instruments.rs',
2021-01-30 16:06:04 +01:00
'backend/client/mediums.rs',
'backend/client/mod.rs',
'backend/client/persons.rs',
2020-11-29 01:00:19 +01:00
'backend/client/recordings.rs',
2021-01-30 23:16:44 +01:00
'backend/client/register.rs',
2020-11-29 00:12:23 +01:00
'backend/client/works.rs',
2020-11-17 15:52:47 +01:00
'backend/library.rs',
2020-11-14 22:32:21 +01:00
'backend/mod.rs',
'backend/secure.rs',
2020-11-17 15:52:47 +01:00
'database/ensembles.rs',
'database/instruments.rs',
'database/medium.rs',
2020-11-01 17:37:04 +01:00
'database/mod.rs',
2020-11-17 15:52:47 +01:00
'database/persons.rs',
'database/recordings.rs',
2020-11-01 17:37:04 +01:00
'database/schema.rs',
2020-11-17 15:52:47 +01:00
'database/thread.rs',
'database/works.rs',
2020-12-02 15:41:19 +01:00
'editors/ensemble.rs',
'editors/instrument.rs',
'editors/mod.rs',
'editors/performance.rs',
'editors/person.rs',
'editors/recording.rs',
'editors/work.rs',
'editors/work_part.rs',
'editors/work_section.rs',
2021-01-25 14:00:57 +01:00
'import/disc_source.rs',
2021-01-29 17:51:44 +01:00
'import/folder_source.rs',
2021-01-25 14:00:57 +01:00
'import/medium_editor.rs',
'import/mod.rs',
'import/source.rs',
2021-01-25 14:00:57 +01:00
'import/source_selector.rs',
'import/track_editor.rs',
'import/track_selector.rs',
'import/track_set_editor.rs',
2021-02-02 10:59:28 +01:00
'navigator/mod.rs',
'navigator/window.rs',
2021-02-02 10:39:38 +01:00
'preferences/login.rs',
'preferences/mod.rs',
'preferences/register.rs',
'preferences/server.rs',
'screens/ensemble.rs',
2020-11-01 17:37:04 +01:00
'screens/mod.rs',
'screens/person.rs',
2020-11-07 20:07:26 +01:00
'screens/player_screen.rs',
'screens/recording.rs',
'screens/work.rs',
2020-12-02 15:41:19 +01:00
'selectors/ensemble.rs',
'selectors/instrument.rs',
'selectors/mod.rs',
'selectors/person.rs',
'selectors/recording.rs',
'selectors/selector.rs',
'selectors/work.rs',
'widgets/button_row.rs',
2021-02-01 18:31:05 +01:00
'widgets/editor.rs',
'widgets/entry_row.rs',
'widgets/upload_section.rs',
2021-01-25 14:00:57 +01:00
'widgets/indexed_list_model.rs',
2020-11-01 17:37:04 +01:00
'widgets/list.rs',
'widgets/mod.rs',
2020-11-07 16:11:08 +01:00
'widgets/player_bar.rs',
2020-11-01 17:37:04 +01:00
'widgets/poe_list.rs',
'widgets/screen.rs',
'widgets/section.rs',
2020-11-07 16:11:08 +01:00
'config.rs',
'config.rs.in',
2021-02-02 09:47:14 +01:00
'macros.rs',
2020-11-01 17:37:04 +01:00
'main.rs',
2020-11-07 16:11:08 +01:00
'player.rs',
2020-11-01 17:37:04 +01:00
'resources.rs',
'resources.rs.in',
'window.rs',
)
cargo_script = find_program(join_paths(meson.source_root(), 'build-aux/cargo.sh'))
cargo_release = custom_target(
'cargo-build',
build_by_default: true,
input: sources,
depends: resources,
output: meson.project_name(),
console: true,
install: true,
install_dir: get_option('bindir'),
command: [
cargo_script,
meson.build_root(),
meson.source_root(),
'@OUTPUT@',
get_option('buildtype'),
meson.project_name(),
]
)