Install#
Meson (recommended)#
git clone --recurse-submodules https://github.com/HaoZeke/c-capnproto.git
cd c-capnproto
meson setup build
meson compile -C build
# plugin: build/capnpc-c runtime: build/libcapnp.a (or shared)
meson install -C build # optional: put capnpc-c on PATH
CMake (optional)#
Meson is the default. CMake is an install-path alternative (MSVC / IDE /
packagers). It does not use the DKML dk wrapper and does not fetch or
delete the gtest/ submodule.
cmake -S . -B build-cmake
cmake --build build-cmake
cmake --install build-cmake
ctest --test-dir build-cmake # only if CMake found an installed GTest
Tests are skipped when GTest is not installed. Use Meson (or autotools
with the existing gtest/ submodule) for the full suite.
Autotools#
git clone --recurse-submodules https://github.com/HaoZeke/c-capnproto.git
cd c-capnproto
autoreconf -f -i -s
./configure
make
make check
Kernel module#
The runtime can be compiled into a kernel module (__KERNEL__). This is
not the default and is not covered by CI. See KERNEL.md and
examples/kernel.