Most Unix/Linux systems already have OpenSSL preinstalled. If your system does not have OpenSSL, please get it from http://www.openssl.org or another source. You do not have to build OpenSSL yourself - a binary distribution is fine. For example, via Debian APT:
$ apt-get install openssl libssl-dev
On macOS, the easiest way to install OpenSSL is via Homebrew:
$ brew install openssl
The easiest way to install OpenSSL on Windows is to use a binary (prebuild) release, for example the one from Shining Light Productions that comes with a Windows installer.
On Windows, POCO can also use the native Windows TLS APIs (SChannel).
All dependencies can be installed with the following commands:
$ sudo apt-get -y update && sudo apt-get -y install git g++ make cmake libssl-dev
$ sudo yum install -y git gcc-c++ make cmake3 openssl-devel
$ brew install cmake openssl
CMake (version 3.5 or newer) is the recommended build system for building the POCO C++ Libraries.
$ git clone -b master https://github.com/pocoproject/poco.git $ cd poco $ mkdir cmake-build $ cd cmake-build $ cmake .. $ cmake --build . --config Release
On macOS, it's necessary to tell CMake where to find the OpenSSL headers
and libraries by setting the
OPENSSL_ROOT_DIR CMake variable.
For example, if OpenSSL has been installed with Homebrew,
cmake invocation becomes:
$ cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
Other common ways of building with CMake (e.g.,
cmake-gui) will also work.
There are also a number of project-specific CMake variables that can be changed.
With a proper CMake toolchain file (specified via the
CMAKE_TOOLCHAIN_FILE CMake variable),
the POCO C++ Libraries can be cross-compiled for embedded Linux systems:
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mytoolchain.cmake -DCMAKE_INSTALL_PREFIX=/path/to/target
The POCO C++ Libraries headers and libraries can be optionally be installed by building the
$ sudo cmake --build . --target install
The default install location is
/usr/local/ on Linux and macOS and
C:\Program Files (x64)\ on Windows and can be overridden by setting
CMAKE_INSTALL_PREFIX CMake variable.
If you do not want to or cannot use CMake, POCO can also be built with Visual Studio (project and solution files included) or GNU Make (Linux, macOS and other supported Unix platforms).
Please refer to the documentation for more information.
POCO can also be obtained via different package managers.
Please see CONTRIBUTING for submitting contributions, bugs reports, feature requests or security issues.
In regards to Boost, in spite of some functional overlapping, POCO is best thought of as a Boost complement (rather than replacement). Side-by-side use of Boost and POCO is a very common occurrence.