Files
slocker-lite/meson.build
T
ceamac 0b1698dc97 Rename the executable from slocker_lite to slocker-lite
Matches the project name and the slocker-lite-priv-drop helper's own
naming convention.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv3s5jckJKzh6JkMoi2Akz
2026-08-21 12:06:03 +00:00

39 lines
1.6 KiB
Meson

project('slocker-lite', 'cpp',
version : '0.0.1',
default_options : ['warning_level=3', 'cpp_std=c++20'])
fmt_dep = dependency('fmt')
catch2_dep = dependency('catch2', required : get_option('enable_tests'))
yaml_dep = dependency('yaml-0.1')
archive_dep = dependency('libarchive')
json_dep = dependency('nlohmann_json')
spdlog_dep = dependency('spdlog')
conf_data = configuration_data()
conf_data.set_quoted('PACKAGE', meson.project_name())
conf_data.set_quoted('VERSION', meson.project_version())
conf_data.set10('ENABLE_TESTS', get_option('enable_tests'))
configure_file(output : 'config.h', configuration : conf_data)
slocker_lite = executable('slocker-lite',
['src/main.cpp', 'src/process.cpp', 'src/oci_image.cpp', 'src/containers_storage.cpp',
'src/bwrap.cpp', 'src/user_spec.cpp'],
include_directories : include_directories('.'),
dependencies : [fmt_dep, catch2_dep, yaml_dep, archive_dep, json_dep, spdlog_dep],
install : true)
# Bind-mounted into the sandbox by -r/--run's --user/--group handling (src/bwrap.cpp),
# so it must be dependency-free and statically linked to run regardless of what
# libc/libraries the container image itself has.
priv_drop_helper = executable('slocker-lite-priv-drop',
['src/priv_drop_helper.cpp'],
link_args : ['-static'],
install : true)
fixture_tar = custom_target('oci-fixture',
output : 'fixture.tar',
command : [find_program('python3'), files('tests/gen_fixture.py'), '@OUTPUT@'])
test('test', find_program('python3'), args : [files('tests/run_test.py'), slocker_lite, fixture_tar])