mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
1b8d4a6f1e54 Merge bitcoin-core/libmultiprocess#194: mpgen: Work around c++20 / capnproto 0.8 incompatibility f1fad396bf5f Merge bitcoin-core/libmultiprocess#195: ci: Add openbsd eed42f210d17 ci: Bump all tasks to actions/checkout@v5 486a510bbeff ci: Remove ancient and problematic -lstdc++fs in mpexample dd40897efe79 Add missing thread include 98414e7d2867 ci: Add openbsd dc3ba2204606 cmake, doc: Add check for CVE-2022-46149 cb170d4913a2 Merge bitcoin-core/libmultiprocess#193: build: require CapnProto 0.7.0 or better 8ceeaa6ae401 ci: Add olddeps job to test old dependencies versions c4cb758eccb5 mpgen: Work around c++20 / capnproto 0.8 incompatibility 30930dff7b06 build: require CapnProto 0.7.0 or better git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 1b8d4a6f1e54b92708bd2ad627ec6d440a1daf3d
53 lines
1.4 KiB
Markdown
53 lines
1.4 KiB
Markdown
# libmultiprocess Installation
|
|
|
|
Installation currently requires Cap'n Proto 0.7 or higher:
|
|
|
|
```sh
|
|
apt install libcapnp-dev capnproto
|
|
brew install capnp cmake
|
|
dnf install capnproto
|
|
```
|
|
|
|
Installation steps are:
|
|
|
|
```sh
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
make
|
|
make check # Optionally build and run tests
|
|
make install
|
|
```
|
|
|
|
To build with libmultiprocess in a CMake project can specify:
|
|
|
|
```cmake
|
|
find_package(Libmultiprocess)
|
|
target_capnp_sources(mytarget ${CMAKE_CURRENT_SOURCE_DIR} myschema.capnp)
|
|
```
|
|
|
|
Which will locate the libmultiprocess cmake package, and call the
|
|
`target_capnp_sources` function to generate C++ files and link them into a
|
|
library or executable target. See `example/CMakeLists.txt` for a complete
|
|
example.
|
|
|
|
To build with libmultiprocess in a non-CMake project can use installed
|
|
`<prefix>/include/mpgen.mk` Makefile rule to generate C++ files, and
|
|
`<prefix>/lib/pkgconfig/libmultiprocess.pc` pkg-config definition to link
|
|
against the runtime library.
|
|
|
|
For cross-compilation, it may be useful to build the runtime library and code
|
|
generation binaries separately, which can be done with:
|
|
|
|
```sh
|
|
make install-bin # install bin/mpgen and related files
|
|
make install-lib # install lib/libmultiprocess.a and related files
|
|
```
|
|
|
|
It is also possible to import CMake targets separately with:
|
|
|
|
```cmake
|
|
find_package(Libmultiprocess COMPONENTS Bin)
|
|
find_package(Libmultiprocess COMPONENTS Lib)
|
|
```
|