Split into multiple crates

This commit is contained in:
Elias Projahn 2021-02-04 21:47:22 +01:00
parent d7fb996183
commit 5d06ec9faf
88 changed files with 501 additions and 528 deletions

View file

@ -1,134 +0,0 @@
prefix = get_option('prefix')
localedir = join_paths(prefix, get_option('localedir'))
global_conf = configuration_data()
global_conf.set_quoted('LOCALEDIR', localedir)
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
)
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(
'backend/client/ensembles.rs',
'backend/client/instruments.rs',
'backend/client/mediums.rs',
'backend/client/mod.rs',
'backend/client/persons.rs',
'backend/client/recordings.rs',
'backend/client/register.rs',
'backend/client/works.rs',
'backend/database/ensembles.rs',
'backend/database/error.rs',
'backend/database/instruments.rs',
'backend/database/medium.rs',
'backend/database/mod.rs',
'backend/database/persons.rs',
'backend/database/recordings.rs',
'backend/database/schema.rs',
'backend/database/thread.rs',
'backend/database/works.rs',
'backend/error.rs',
'backend/library.rs',
'backend/mod.rs',
'backend/player.rs',
'backend/secure.rs',
'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',
'import/disc_source.rs',
'import/folder_source.rs',
'import/medium_editor.rs',
'import/mod.rs',
'import/source.rs',
'import/source_selector.rs',
'import/track_editor.rs',
'import/track_selector.rs',
'import/track_set_editor.rs',
'navigator/mod.rs',
'navigator/window.rs',
'preferences/login.rs',
'preferences/mod.rs',
'preferences/register.rs',
'preferences/server.rs',
'screens/ensemble.rs',
'screens/mod.rs',
'screens/person.rs',
'screens/player_screen.rs',
'screens/recording.rs',
'screens/work.rs',
'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',
'widgets/editor.rs',
'widgets/entry_row.rs',
'widgets/upload_section.rs',
'widgets/indexed_list_model.rs',
'widgets/list.rs',
'widgets/mod.rs',
'widgets/player_bar.rs',
'widgets/poe_list.rs',
'widgets/screen.rs',
'widgets/section.rs',
'config.rs',
'config.rs.in',
'macros.rs',
'main.rs',
'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(),
]
)