Skip to main content
Starting with macOS El Capitan, Apple removed the system OpenSSL headers. You must install OpenSSL separately — Homebrew is the recommended approach.
More documentation may be found at the FreeRDP Compilation wiki.

Prerequisites

Install Homebrew, then install the required dependencies:
brew install \
  cmake ninja pkg-config \
  openssl \
  krb5 \
  cjson \
  sdl2 sdl2_ttf \
  ffmpeg \
  libusb

OpenSSL PKG_CONFIG_PATH

Because Homebrew installs OpenSSL in a non-default location, you must set PKG_CONFIG_PATH before running CMake:
export PKG_CONFIG_PATH=$(brew --prefix)/opt/openssl/lib/pkgconfig
Add this line to your shell profile (~/.zshrc or ~/.bash_profile) to make it permanent.

Build

1

Clone the repository

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

Set PKG_CONFIG_PATH for OpenSSL

export PKG_CONFIG_PATH=$(brew --prefix)/opt/openssl/lib/pkgconfig
3

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
4

Compile and install

cmake --build /tmp/freerdp/build --target install

CI preload configuration

The repository ships a macOS preload file at ci/cmake-preloads/config-macosx.txt. The key settings it applies are:
set(WITH_CUPS ON CACHE BOOL "CUPS printing")
set(WITH_X11 ON CACHE BOOL "Enable X11")
set(WITH_SERVER ON CACHE BOOL "build with server")
set(WITH_KRB5 OFF CACHE BOOL "Kerberos support")
set(WITH_FFMPEG OFF CACHE BOOL "ci default")
set(WITH_SWSCALE OFF CACHE BOOL "ci default")
Apply it with:
cmake -C /tmp/freerdp/src/ci/cmake-preloads/config-macosx.txt \
  -GNinja \
  -B /tmp/freerdp/build \
  -S /tmp/freerdp/src

cmake --build /tmp/freerdp/build

Notable macOS flags

FlagDescription
-DWITH_CUPS=ONEnable CUPS printing support.
-DWITH_X11=ONBuild the X11 client (requires XQuartz).
-DWITH_KRB5=OFFDisable Kerberos (often not available on macOS without extra setup).
-DCHANNEL_URBDRC=OFFDisable USB redirection (no libusb in default macOS CI).
-DWITH_FUSE=OFFDisable FUSE clipboard (macFUSE required if enabled).
Use ccmake /tmp/freerdp/build to browse and modify all CMake cache variables interactively.