LibMCP 0.6.1
API to control MCPnet
Loading...
Searching...
No Matches
Installing Poco C++ Libraries

This guide describes where to get the Poco C++ Libraries and (if needed) how to build it.

For reference see the official guide on how to download and build Poco.

Linux

Installing Poco on Linux (Debian / Ubuntu) is as easy as

sudo apt install libpoco-dev

See the ROS index if you're not on a Debian or Ubuntu derivate.

Windows

On Windows Poco is installed automatically by vcpkg in manifest mode (see vcpkg.json) when LibMCP is configured with one of the windows-* presets, see Building LibMCP. Nothing has to be installed manually, only VCPKG_ROOT has to point to vcpkg:

  • Visual Studio (2022 or newer) with the C++ workload ships vcpkg and sets VCPKG_ROOT in its developer environment.
  • To use a separate vcpkg clone instead, set the environment variable VCPKG_ROOT to it.

Poco is built with the triplet x64-windows-static-md, so it is linked right into MCP.dll and no Poco DLLs have to be shipped.

When LibMCP is included into another project (e.g. with FetchContent), that project has to provide Poco, e.g. with its own vcpkg.json.

Building with CMake

Before building Poco you need to download its sources.

git clone https://github.com/pocoproject/poco.git

From within the Poco source tree, run the following commands:

mkdir cmake-build
cd cmake-build
cmake .. -DCMAKE_INSTALL_PREFIX="path/to/install/directory" -DBUILD_SHARED_LIBS=ON
cmake --build . --target install

This will build a shared (use OFF for static) library of every available Poco module. LibMCP only uses Poco::Foundation and Poco::Net. Other modules can be omitted like this:

-DENABLE_XML=OFF

The install directory defaults to CMAKE_INSTALL_PREFIX. For more options see the Poco CMakeLists.txt.