FreeRDP uses CMake as its build system and supports Linux, macOS, Windows, Android, and iOS. This page covers the build system fundamentals. For platform-specific instructions follow the links at the bottom of this page.
Requirements
CMake >= 3.13
A C compiler (GCC, Clang, or MSVC)
Ninja (recommended) or another CMake-supported generator
Build types
Pass -DCMAKE_BUILD_TYPE=<type> to CMake to select a build type.
Type Description ReleaseFully optimised, no debug symbols. Recommended for production. RelWithDebInfoOptimised with debug symbols included. DebugNo optimisations, full debug symbols.
General build example
Assume source is at /tmp/freerdp/src and you want to install to /tmp/freerdp/install:
cmake -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_VERBOSE_WINPR_ASSERT=OFF \
-DCMAKE_PREFIX_PATH=/tmp/freerdp/install \
-B /tmp/freerdp/build \
-S /tmp/freerdp/src
cmake --build /tmp/freerdp/build --target install
On Windows this command must be run from a Visual Studio Developer Command Prompt or a cmd session that has already executed vcvarsall.bat. Paths must be adjusted for Windows conventions.
Key CMake flags
Build verbosity and assertions
Flag Default Description CMAKE_BUILD_TYPE— Build type: Debug, Release, RelWithDebInfo WITH_VERBOSE_WINPR_ASSERTONEnables runtime sanity checks. Set to OFF for stable/release builds to reduce binary size. CMAKE_VERBOSE_MAKEFILEOFFPrint each compiler command during the build.
SSL
Flag Description -DWITH_OPENSSL=ONUse OpenSSL (default). Also selects LibreSSL as a drop-in replacement. -DWITH_MBEDTLS=ONUse MBedTLS (set -DWITH_OPENSSL=OFF first). -DWITH_INTERNAL_MD4=ONShip internal MD4 when the SSL library has deprecated it. -DWITH_INTERNAL_MD5=ONShip internal MD5 when the SSL library has deprecated it. -DWITH_INTERNAL_RC4=ONShip internal RC4 when the SSL library has deprecated it.
Authentication
Flag Description -DWITH_KRB5=OFFDisable Kerberos (MIT or Heimdal). Enabled by default when found. -DWITH_PCSC=OFFDisable PC/SC smartcard redirection. -DWITH_PKCS11=OFFDisable PKCS#11 NLA smartcard logon.
JSON
Flag Description -DWITH_JSON_DISABLED=ONDisable JSON support (cJSON or json-c). Required for Azure logon.
H.264 / graphics
Flag Description -DWITH_OPENH264=ONEnable OpenH264 codec. -DWITH_FFMPEG=ONEnable FFmpeg (x264 or OpenH264). -DWITH_SWSCALE=ONEnable Swscale for high-DPI / smart-sizing. -DWITH_CAIRO=ONEnable Cairo for high-DPI / smart-sizing.
Audio
Flag Description -DWITH_GSM=ONEnable GSM codec. -DWITH_DSP_FFMPEG=ONUse FFmpeg for audio DSP. -DWITH_DSP_EXPERIMENTAL=ONEnable experimental codecs (e.g. AAC encoding).
Flag Description -DWITH_X11=OFFDisable X11 client/server. -DWITH_WAYLAND=OFFDisable Wayland client (wlfreerdp). -DWITH_PULSE=OFFDisable PulseAudio. -DWITH_ALSA=OFFDisable ALSA audio. -DWITH_CUPS=OFFDisable CUPS printing. -DWITH_FUSE=OFFDisable FUSE-based clipboard file transfer. -DWITH_LIBSYSTEMD=OFFDisable journald logging. -DCHANNEL_URBDRC=OFFDisable USB redirection channel.
Client and server
Flag Description -DWITH_CLIENT_SDL=OFFDisable the SDL2 client. -DWITH_SERVER=OFFDisable server-side builds. -DWITH_PROXY=OFFDisable the RDP proxy. -DWITH_SHADOW=OFFDisable the shadow server. -DWITH_SAMPLE=OFFDisable client/server samples. -DWITH_WINPR_TOOLS=OFFDisable helper utilities (certificate/NTLM tools).
CMake preload files
The repository ships preload files under ci/cmake-preloads/ that capture recommended configurations for each platform. Apply one with:
cmake -C ci/cmake-preloads/config-linux-all.txt -GNinja -B build -S .
You can also use ccmake (Linux/macOS) for an interactive curses UI to inspect and change the current CMakeCache.txt.
Dependencies summary
Dependency Requirement Notes SSL library Required OpenSSL (default), LibreSSL, or MBedTLS Kerberos Optional MIT or Heimdal; disable with -DWITH_KRB5=OFF cJSON / json-c Optional Azure logon; disable with -DWITH_JSON_DISABLED=ON OpenH264 / FFmpeg Optional H.264 graphics (GFX); required for Windows 8.1+ servers Swscale / Cairo Optional High-DPI and smart-sizing FAAC / FAAD2 / soxr Optional AAC audio encode/decode/resample libusb 1 Optional USB redirection channel ICU Required (Linux/Android) UTF-16 ↔ UTF-8 conversion SDL2 Optional SDL client
Linux Ubuntu/Debian and Fedora build instructions.
macOS Homebrew-based build with OpenSSL setup.
Windows MSVC and MinGW cross-compilation.
Android NDK and Android Studio build.
iOS Xcode and iOS simulator build.