Prerequisites
Ubuntu / Debian
Fedora / RHEL
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
sudo dnf install -y \
gcc gcc-c++ git cmake ninja-build pkg-config \
openssl-devel \
libX11-devel libXext-devel libXinerama-devel libXcursor-devel \
libXdamage-devel libXv-devel libxkbfile-devel \
wayland-devel libxkbcommon-devel \
alsa-lib-devel pulseaudio-libs-devel \
krb5-devel \
cjson-devel \
libusb1-devel \
ffmpeg-devel \
cups-devel \
pcsc-lite-devel \
fuse3-devel \
SDL2-devel SDL2_ttf-devel
Clone the repository
git clone https://github.com/FreeRDP/FreeRDP.git /tmp/freerdp/src
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
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
| Flag | Description |
|---|
-DWITH_X11=ON | Build the X11 client and server (default on Linux). |
-DWITH_WAYLAND=ON | Build wlfreerdp, the Wayland client. |
-DWITH_X11=OFF -DWITH_WAYLAND=OFF | Headless / library-only build. |
| Flag | Description |
|---|
-DWITH_OPENSSL=ON | Use OpenSSL (default). |
-DWITH_MBEDTLS=ON | Use MBedTLS instead (set -DWITH_OPENSSL=OFF). |
H.264 and graphics scaling
| Flag | Description |
|---|
-DWITH_FFMPEG=ON | Enable FFmpeg-based H.264 and audio. |
-DWITH_OPENH264=ON | Enable Cisco OpenH264. |
-DWITH_SWSCALE=ON | Enable Swscale for high-DPI / smart-sizing. |
-DWITH_CAIRO=ON | Enable Cairo for high-DPI / smart-sizing. |
| Flag | Description |
|---|
-DWITH_PULSE=ON | Enable PulseAudio (default when headers found). |
-DWITH_ALSA=ON | Enable ALSA (default when headers found). |
-DWITH_DSP_FFMPEG=ON | Use FFmpeg for audio processing. |
Server and proxy
| Flag | Description |
|---|
-DWITH_SERVER=ON | Build server-side libraries. |
-DWITH_PROXY=ON | Build the RDP proxy. |
-DWITH_SHADOW=ON | Build 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.