LibMCP  0.1.5
API to control MCPnet
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

For Windows your only option to get Poco binaries is to use a package manager like Conan or Vcpkg. Both are listed in the official guide. On the other hand there's always the option to build Poco yourself using CMake - this is described in the next section.

For convenience there's also a Windows PowerShell script that will download, build and install all necessary Poco modules. The following command needs to be executed from within a Windows PowerShell.

.\libmcp\poco\get_poco_win.ps1 -A "x64" -G "Visual Studio 16 2019" -B "Release" -Static
  • The architecture -A can be either "x64" or "Win32" or be omitted.
  • For a list of CMake generators -G for your system run cmake --help.
  • The build type -B can be one of: "Debug", "Release", "MinSizeRel", "RelWithDebInfo".
  • The switch -Static indicates if Poco should be built shared or static.

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.