From 9e5d23061cc464b08aaa0cadf05747f7e897b5f5 Mon Sep 17 00:00:00 2001 From: psykose Date: Tue, 29 Oct 2024 19:44:40 +0100 Subject: [PATCH] more meson stuff --- Cargo.toml | 3 +++ meson.build | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 34e3283..1491235 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,6 @@ gtk = { version = "0.9.2", package = "gtk4", features = ["v4_16"] } [build-dependencies] glib-build-tools = "0.20.0" + +[profile.dev] +split-debuginfo = "unpacked" diff --git a/meson.build b/meson.build index 4d8748d..9a8cd94 100644 --- a/meson.build +++ b/meson.build @@ -52,6 +52,10 @@ else endif cargo = find_program('cargo') +cargo_env = environment() +cargo_env.set('MESON_BUILD_ROOT', meson.project_build_root()) +cargo_env.append('RUSTFLAGS', '-L ' + fs.parent(audrey_c.full_path()), separator: ' ') + custom_target( 'cargo-build', build_by_default: true, @@ -61,19 +65,14 @@ custom_target( blueprints, ], console: true, + # means nothing (always stale and uncopied), we can't cp since env: drops the /bin/sh wrapper output: meson.project_name(), command: [ - 'env', - 'RUSTFLAGS=-L ' + fs.parent(audrey_c.full_path()), - 'MESON_BUILD_ROOT=' + meson.project_build_root(), cargo, 'build', rust_args, '--manifest-path', meson.project_source_root() / 'Cargo.toml', '--target-dir', meson.project_build_root() / 'cargo-target', - '&&', - 'cp', - 'cargo-target' / rust_target / meson.project_name(), - '@OUTPUT@', ], + env: cargo_env, )