Skip to main content

Prerequisites

sudo apt-get update
sudo apt-get install -y \
  build-essential git cmake ninja-build pkg-config \
  libssl-dev \
  libx11-dev libxext-dev libxinerama-dev libxcursor-dev \
  libxdamage-dev libxv-dev libxkbfile-dev \
  libwayland-dev libxkbcommon-dev \
  libasound2-dev libpulse-dev \
  libkrb5-dev \
  libcjson-dev \
  libusb-1.0-0-dev \
  libavcodec-dev libavutil-dev libswscale-dev \
  libcups2-dev \
  libpcsclite-dev \
  libfuse3-dev \
  libsdl2-dev libsdl2-ttf-dev

Build

1

Clone the repository

git clone https://github.com/FreeRDP/FreeRDP.git /tmp/freerdp/src
2

Configure with CMake

cmake -GNinja \
  -DCMAKE_BUILD_TYPE=Release \
  -DWITH_VERBOSE_WINPR_ASSERT=OFF \
  -DCMAKE_INSTALL_PREFIX=/tmp/freerdp/install \
  -B /tmp/freerdp/build \
  -S /tmp/freerdp/src
3

Compile and install

cmake --build /tmp/freerdp/build --target install
Using Ninja (-GNinja) significantly speeds up incremental builds compared to the default Makefile generator.

Common CMake options

Display subsystems

FlagDescription
-DWITH_X11=ONBuild the X11 client and server (default on Linux).
-DWITH_WAYLAND=ONBuild wlfreerdp, the Wayland client.
-DWITH_X11=OFF -DWITH_WAYLAND=OFFHeadless / library-only build.

SSL

FlagDescription
-DWITH_OPENSSL=ONUse OpenSSL (default).
-DWITH_MBEDTLS=ONUse MBedTLS instead (set -DWITH_OPENSSL=OFF).

H.264 and graphics scaling

FlagDescription
-DWITH_FFMPEG=ONEnable FFmpeg-based H.264 and audio.
-DWITH_OPENH264=ONEnable Cisco OpenH264.
-DWITH_SWSCALE=ONEnable Swscale for high-DPI / smart-sizing.
-DWITH_CAIRO=ONEnable Cairo for high-DPI / smart-sizing.

Audio

FlagDescription
-DWITH_PULSE=ONEnable PulseAudio (default when headers found).
-DWITH_ALSA=ONEnable ALSA (default when headers found).
-DWITH_DSP_FFMPEG=ONUse FFmpeg for audio processing.

Server and proxy

FlagDescription
-DWITH_SERVER=ONBuild server-side libraries.
-DWITH_PROXY=ONBuild the RDP proxy.
-DWITH_SHADOW=ONBuild the shadow server.

Using a CMake preload file

The repository includes a preload for a full Linux debug build with all optional features enabled:
cmake -C /tmp/freerdp/src/ci/cmake-preloads/config-linux-all.txt \
  -GNinja \
  -B /tmp/freerdp/build \
  -S /tmp/freerdp/src

cmake --build /tmp/freerdp/build

Debug vs release example

cmake -GNinja \
  -DCMAKE_BUILD_TYPE=Release \
  -DWITH_VERBOSE_WINPR_ASSERT=OFF \
  -B build -S .
cmake --build build
For builds that are not from a stable release, keep -DWITH_VERBOSE_WINPR_ASSERT=ON so that crashes produce useful diagnostic output.