`meson install` of a Release tree staged 2.4 GiB: all 28 internal static libraries (1.3 GiB), the whole include/ tree (459 files), 22 pkg-config files for libraries that were never meant to be linked from outside, and the ONNX resource library in the system libdir. Packages hid this by deleting include/, *.a and pkgconfig/ after the fact. - Internal static libraries are `install: false` and their pkg.generate() calls are gone, as is the top-level yams.pc (it required yams-api, which is not installable). Benchmarks are no longer installed either. - Headers are not installed: no installable C++ library exists to link them against. The one SDK surface, the mobile C ABI, installs mobile_bindings.h and its .pc under the 'devel' install tag. - Runtime installs carry explicit install_tag: 'runtime' where Meson cannot infer one (data, systemd unit/preset, the yams alias symlink, Windows DLL copies, the libzpdf install script), so `meson install --tags runtime` stages the same set as a plain install. - libyams_onnx_resource moves from <libdir> to the private <libdir>/yams on Linux/macOS, without a soname version since nothing outside this build links it. yams-cli/yams-daemon RUNPATH becomes $ORIGIN/../lib/yams (@executable_path on macOS) and the ONNX/Glint plugins use $ORIGIN/.. so they resolve it and the bundled ONNX Runtime, which also moves to <libdir>/yams (the ONNX plugin's runtime loader already searches its parent directory). Windows keeps its existing DLL layout. - Homebrew templates and the macOS install smoke follow the new layout. - scripts/prune-runtime-install.sh only strips now. Measured on grim (Linux x86_64 Release, prefix /usr/local): staged paths 522 -> 11, staged bytes 2.4 GiB -> 1.0 GiB (unstripped) check_install_surface path violations: 6 -> 0 `--tags devel` stages nothing; ldd resolves libyams_onnx_resource from bin/../lib/yams and the staged `yams --version` runs. Signed-off-by: trvon <me@trevon.dev>
45 lines
1.2 KiB
Meson
45 lines
1.2 KiB
Meson
fs = import('fs')
|
|
|
|
if not cli11_resolved_dep.found()
|
|
message('CLI11 not found; skipping yams-mcp-server target')
|
|
subdir_done()
|
|
endif
|
|
|
|
deps = [
|
|
dependency('yams_mcp'),
|
|
dependency('yams_api'),
|
|
dependency('yams_search'),
|
|
dependency('yams_app_services'),
|
|
dependency('yams_downloader'),
|
|
dependency('yams_config'),
|
|
dependency('nlohmann_json'),
|
|
dependency('spdlog'),
|
|
boost_dep,
|
|
dependency('threads'),
|
|
cli11_resolved_dep,
|
|
]
|
|
|
|
if not get_option('wasi')
|
|
deps += dependency('yams_daemon_client')
|
|
deps += dependency('OpenSSL')
|
|
endif
|
|
|
|
yams_mcp_exe = executable('yams-mcp-server',
|
|
'main.cpp',
|
|
include_directories: [
|
|
include_directories('../../include'),
|
|
],
|
|
dependencies: deps,
|
|
install: true,
|
|
install_dir: get_option('bindir'),
|
|
)
|
|
|
|
# --- Windows: Copy runtime DLLs next to the MCP server executable ---
|
|
# Use install: true so DLLs are included in meson install output for MSI packaging
|
|
if host_machine.system() == 'windows' and windows_runtime_dlls.length() > 0
|
|
foreach dll_info : windows_runtime_dlls
|
|
dll_name = dll_info[0]
|
|
dll_src = dll_info[1]
|
|
fs.copyfile(dll_src, dll_name, install: true, install_dir: get_option('bindir'), install_tag: 'runtime')
|
|
endforeach
|
|
endif
|