Skip to content

Build Options

jacobopantoja edited this page Jul 4, 2020 · 25 revisions

There are several options you can specify when you create the Makefiles/Project Files with cmake. You can see some, but not all, if you use ccmake or the windows equivalent cmake-gui. The ones listed are mostly selfexplanatory, so lets focus her on the ones not listed. The settings in the listing below are the opposite of the default.

  • -DMONOLITHIC_BUILD=ON : This will build libfreerdp and libwinpr into one single dll each (requires cmake >= 2.8.8)
  • -DBUILD_SHARED_LIBS=OFF : This together with MONOLITHIC_BUILD will build one large single executable
  • -DCMAKE_BUILD_TYPE:STRING=Debug : Leave this empty or set it to Release for (optimized) Release build
  • -DCMAKE_OSX_ARCHITECTURES=i386 : (Mac only) Build 32 bit executables
  • -DWITH_SSE2_TARGET : Compile complete code sse2 optimized (-msse2)
  • -DWITH_SSE2=OFF : Disable support for sse2 optimized codecs (nsc, rfx) detection is done at runtime
  • -DWITH_NEON=OFF : Disable support neon optimized codecs (rfx) detection is done at runtime
  • -DWITH_THIRD_PARTY=ON : Enable builing of third-party code located in third-party
  • -DWITH_JPEG=OFF : Disable jpeg codec
  • -DWITH_X11=OFF : When OFF, don't link against X11 (useful when redistributing library files)
  • -DWITH_CUNIT=ON : When ON, create makefiles for building unit tests, runnable with "make test"; “make test” requires -DBUILD_TESTING=ON
  • -DWITH_SERVER=ON : When on, it creates make files for server libs
  • -DWITH_XKBFILE=OFF : When on, keyboard detection is via xkbfile. When off, other keymaps are loaded. The default changed to ON recently. For MacOS Systems, OFF works better
  • -DWITH_VAAPI=ON : When on, use VA-API for hardware AVC decoding. Not available in Windows nor OS X
There are a large number of debug options. To find these options, run the command: cmake -L . | grep WITH_DEBUG

Note that debugging needs a rework Debug-System

To show the used BuildOptions for a binary build just use the cmd line parameter /buildconfig.

   freerdp-binary /buildconfig
   This is FreeRDP version 2.0.0-dev (git 1dbd2d2)
   Build configuration: BUILD_TESTING=OFF BUILTIN_CHANNELS=OFF HAVE_AIO_H=1 HAVE_EVENTFD_H=1 HAVE_EXECINFO_H=1 HAVE_FCNTL_H=1 HAVE_INTTYPES_H=1 HAVE_MATH_C99_LONG_DOUBLE
   Build type:          Release
   CFLAGS:              -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwi
   Compiler:            GNU, 4.8.3
   Target architecture: x64
Clone this wiki locally