websocketpp-0.8.2

#### Supplemental Linux® From Scratch - Version 13.0

### Chapter 2. General Libraries

- Prev

  uthash-2.3.0

- Next

  yajl-2.1.0

- Up
- Home

# websocketpp-0.8.2

## Introduction to websocketpp

The websocketpp package provides a websocket client/server library.

- Download: https://github.com/zaphoyd/websocketpp/archive/0.8.2/websocketpp-0.8.2.tar.gz

### Additional Downloads

- Required patch: https://gitlab.archlinux.org/archlinux/packaging/packages/websocketpp/-/raw/main/websocketpp-0.8.2-boost-1.87-compat.patch

### websocketpp Dependencies

#### Required

CMake

#### Recommended

asio-1-36-0 and boost

## Installation of websocketpp

First, apply several fixes to allow building with boost-1.87 and later:

    patch -Np1 -i ../websocketpp-0.8.2-boost-1.87-compat.patch                       &&
    sed 's|"${WEBSOCKETPP_BOOST_LIBS}"|${WEBSOCKETPP_BOOST_LIBS}|' -i CMakeLists.txt &&
    sed 's/system//' -i CMakeLists.txt

Install websocketpp by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr        \
          -D CMAKE_BUILD_TYPE=Release         \
          -D CMAKE_SKIP_INSTALL_RPATH=ON      \
          -D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
          -D ENABLE_CPP11=ON                  \
          -D BUILD_TESTS=OFF                  \
          -G Ninja ..

Now, as the `root` user:

    ninja install

## Command Explanations

`-D CMAKE_SKIP_INSTALL_RPATH=ON`: This switch makes cmake remove hardcoded library search paths (rpath) when installing a binary executable file or a shared library. This package does not need rpath once it's installed into the standard location, and rpath may sometimes cause unwanted effects or even security issues.

`-D CMAKE_POLICY_VERSION_MINIMUM=3.5`: This allows building with newer CMake versions.

`-D ENABLE_CPP11=ON`: This builds support for the ISO C++11 standard.

`-D BUILD_TESTS=OFF`: This disables building tests.

## Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/include/websocketpp and /usr/lib/cmake/websocketpp

- Prev

  uthash-2.3.0

- Next

  yajl-2.1.0

- Up
- Home