try better meson_config.rs handling
This commit is contained in:
parent
ec2167f8fe
commit
4ee544a88d
4 changed files with 3 additions and 9 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
target/
|
target/
|
||||||
src/meson_config.rs
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ custom_target(
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
build_always_stale: true,
|
build_always_stale: true,
|
||||||
depends: [audrey_c, blueprints],
|
depends: [audrey_c, blueprints],
|
||||||
|
input: config_rs,
|
||||||
console: true,
|
console: true,
|
||||||
# means nothing (always stale and uncopied), we can't cp since env: drops the /bin/sh wrapper
|
# means nothing (always stale and uncopied), we can't cp since env: drops the /bin/sh wrapper
|
||||||
output: meson.project_name(),
|
output: meson.project_name(),
|
||||||
|
|
|
@ -22,18 +22,11 @@ audrey_deps = [
|
||||||
|
|
||||||
audrey_sources += removeme
|
audrey_sources += removeme
|
||||||
|
|
||||||
configure_file(
|
config_rs = configure_file(
|
||||||
output: 'meson_config.rs',
|
output: 'meson_config.rs',
|
||||||
input: 'meson_config.rs.in',
|
input: 'meson_config.rs.in',
|
||||||
configuration: config_h,
|
configuration: config_h,
|
||||||
)
|
)
|
||||||
# awful hack to put the configured file back in source
|
|
||||||
run_command(
|
|
||||||
'cp',
|
|
||||||
meson.project_build_root() / 'src' / 'meson_config.rs',
|
|
||||||
meson.project_source_root() / 'src' / 'meson_config.rs',
|
|
||||||
check: true,
|
|
||||||
)
|
|
||||||
|
|
||||||
audrey_c = static_library(
|
audrey_c = static_library(
|
||||||
'audrey',
|
'audrey',
|
||||||
|
|
1
src/meson_config.rs
Normal file
1
src/meson_config.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
include!(concat!(env!("MESON_BUILD_ROOT"), "/src/meson_config.rs"));
|
Loading…
Reference in a new issue