meson: use static library for tests

Needed as tests use private APIs that are not exported.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2026-02-05 13:30:45 -08:00
parent 798d8f7235
commit 92a4911e88
2 changed files with 21 additions and 4 deletions

View File

@@ -225,6 +225,12 @@ endif
add_project_arguments(cc.get_supported_arguments('-Wno-unused-parameter'), language : 'c')
sym = cc.get_supported_link_arguments(
'-Wl,--version-script,@0@/json-c.sym'.format(
meson.current_source_dir(),
),
)
# Source files
sources = files(
'arraylist.c', 'debug.c', 'json_c_version.c', 'json_object.c',
@@ -249,6 +255,7 @@ libjson = library('json-c',
include_directories: inc,
dependencies: bsd_dep,
install: true,
link_args: sym,
version: '5.4.0',
soversion: '5',
)