Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion credentialsd-common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@
# cargo_options += [
# '--target-dir', meson.project_build_root() / meson.current_build_dir() / 'target',
# ]
# if get_option('cargo_offline') == true
# cargo_options += ['--offline']
# endif
#
# subdir('src')
# subdir('src')
4 changes: 2 additions & 2 deletions credentialsd-common/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# message('Building in debug mode')
# endif
#
# cargo_env = ['CARGO_HOME=' + meson.project_build_root() / 'cargo-home']
# cargo_env = ['CARGO_HOME=' + cargo_home]
#
# custom_target(
# 'cargo-build',
Expand All @@ -31,4 +31,4 @@
# common_lib_name / 'src' / rust_target / common_lib_name,
# '@OUTPUT@',
# ],
# )
# )
8 changes: 8 additions & 0 deletions credentialsd-ui/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ if get_option('profile') == 'development'
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit', check: false)
endif

cargo_options = [
'--manifest-path', meson.project_source_root() / gui_source_dir / 'Cargo.toml',
]
cargo_options += ['--target-dir', meson.project_build_root() / gui_build_dir / 'target']
if get_option('cargo_offline') == true
cargo_options += ['--offline']
endif

subdir('data')
subdir('po')
subdir('src')
Expand Down
9 changes: 2 additions & 7 deletions credentialsd-ui/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ run_command(
check: true,
)

cargo_options = [
'--manifest-path', meson.project_source_root() / gui_source_dir / 'Cargo.toml',
]
cargo_options += ['--target-dir', meson.project_build_root() / gui_build_dir / 'target']

if get_option('profile') == 'default'
cargo_options += ['--release']
rust_target = 'release'
Expand All @@ -36,7 +31,7 @@ else
message('Building in debug mode')
endif

cargo_env = ['CARGO_HOME=' + meson.project_build_root() / 'cargo-home']
cargo_env = ['CARGO_HOME=' + cargo_home]

custom_target(
'cargo-build',
Expand Down Expand Up @@ -72,4 +67,4 @@ test(
'--nocapture',
],
protocol: 'exitcode',
)
)
5 changes: 4 additions & 1 deletion credentialsd/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ cargo_options = [
cargo_options += [
'--target-dir', meson.project_build_root() / meson.current_build_dir() / 'target',
]
if get_option('cargo_offline') == true
cargo_options += ['--offline']
endif

subdir('src')
subdir('tests')
subdir('tests')
4 changes: 2 additions & 2 deletions credentialsd/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else
message('Building in debug mode')
endif

cargo_env = ['CARGO_HOME=' + meson.project_build_root() / 'cargo-home']
cargo_env = ['CARGO_HOME=' + cargo_home]
message('@0@'.format(cargo_options))

custom_target(
Expand Down Expand Up @@ -43,4 +43,4 @@ test(
'--nocapture',
],
protocol: 'exitcode',
)
)
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
localedir = prefix / get_option('localedir')

cargo_home = get_option('cargo_home')
if cargo_home == ''
cargo_home = meson.project_build_root() / 'cargo-home'
endif

meson.add_dist_script(
'build-aux/dist-vendor.sh',
meson.project_build_root() / 'meson-dist' / meson.project_name()
Expand Down
18 changes: 18 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
option(
'profile',
type: 'combo',
choices: ['default', 'development'],
value: 'default',
description: 'The build profile for Credential Manager. One of "default" or "development".',
)
option(
'cargo_home',
type: 'string',
description: 'The directory to store files downloaded by Cargo',
)
option(
'cargo_offline',
type: 'boolean',
value: false,
description: 'Whether to perform an offline build with Cargo. Defaults to false to download crates from registries.',
)
10 changes: 0 additions & 10 deletions meson_options.txt

This file was deleted.

Loading