Building the TeamTalk server and DLL binaries requires that the user is familiar with CMake. CMake is a build system that is able to build TeamTalk binaries and generate project files for various IDEs.
The following secions explain how to build TeamTalk binaries using CMake:
- Install TeamTalk Toolchain Dependencies
- Install the tools required to build TeamTalk on the host build platform:
- Build TeamTalk Binaries
- Invoke CMake to start building the TeamTalk binaries on the host build platform:
- Toolchain Toggles for TeamTalk Build Targets
- Choose if a tool required by TeamTalk should be built by CMake or use
the tool already installed on the host build machine. E.g. use OPUS
installed by
apt install libopus-dev
instead of manually building OPUS.
- Choose if a tool required by TeamTalk should be built by CMake or use
the tool already installed on the host build machine. E.g. use OPUS
installed by
- Feature Toggles for TeamTalk Build Targets
- Choose what features should be compiled into the TeamTalk binaries. E.g. disable Speex in the TeamTalk DLL.
- Toggles for TeamTalk Build Targets
- Toggle what TeamTalk binaries should be built by CMake. E.g. avoid building TeamTalk server.
TeamTalk depends on many external libraries, e.g. OpenSSL and OPUS, and these libraries require a certain set of tools to be installed on the build host in order to compile.
The following sections explain what tools to install on the build host depending on the platform.
Tools for building TeamTalk dependencies on Windows must be installed manually.
- Install ActivePerl or
Strawberry Perl on Windows
- Place
perl.exe
in environment variable %PATH%.- OpenSSL and ACE Framework uses Perl
- Place
- Install Cygwin in
C:/cygwin64
- LibVPX requires cygwin
- Download yasm
- Place
yasm.exe
for x64 inC:/tt5dist/yasm/x64
- Place
yasm.exe
for Win32 inC:/tt5dist/yasm/win32
- LibVPX requires yasm
- Place
A Makefile is available for Ubuntu 22 to install all the dependencies required to build TeamTalk binaries.
- To install build dependencies for Ubuntu 22 run the following in
TEAMTALK_ROOT:
sudo make -C Build depend-ubuntu22
sudo
is required becauseapt install
is called.
Building for Android platform is supported on Ubuntu 22.
- To install build dependencies for Android on Ubuntu 22 run the
following in TEAMTALK_ROOT:
sudo make -C Build depend-ubuntu22
sudo
is required becauseapt install
is called.
- Download Android NDK r21e and
unzip it. Make environment variable
ANDROID_NDK_HOME
point to the unzipped location.
Build for macOS platform is supported by using Homebrew.
- To install build dependencies for macOS run the following in
TEAMTALK_ROOT:
make -C Build depend-mac
Build for iOS platform is supported by using Homebrew on macOS.
- To install build dependencies for iOS on macOS run the following in
TEAMTALK_ROOT:
make -C Build depend-mac
Now that all required tool dependencies have been installed it is possible to build the TeamTalk binaries. Again depending on the platform there's different ways of doing this.
Building TeamTalk for Windows is supported by Visual Studio 2019.
To build TeamTalk for Windows first start x86 Native Tools Command
Prompt for VS 2019. Use Git to clone
TeamTalk5 repository into
C:\TeamTalk5
.
Use CMake to generate a valid build configuration in C:\builddir
that will install binaries into C:\installdir
:
cmake -DCMAKE_INSTALL_PREFIX=C:/installdir -S C:/TeamTalk5 -B C:/builddir -A Win32
Given that CMake managed to create a valid build configuration now start the build process:
cmake --build C:/builddir --config Release --target install
To get a Visual Studio solution file for building TeamTalk from Visual Studio 2019 run CMake like this:
cmake -G "Visual Studio 16 2019" -S C:/TeamTalk5 -B C:/builddir -A Win32
Note that WebRTC dependency will create a folder in C:\webrtc
where
it downloads its repository.
Run the following command in TEAMTALK_ROOT:
make -C Build ubuntu22
This will cause make
to call CMake to generate a valid build
configuration and afterwards build the binaries.
Run the following command in TEAMTALK_ROOT:
make -C Build android-all
This will build TeamTalk binaries for architectures armeabi-v7a, arm64-v8a, x86 and x64.
Run the following command in TEAMTALK_ROOT:
make -C Build mac
This will cause make
to call CMake to generate a valid build
configuration and afterwards build the binaries.
Run the following command in TEAMTALK_ROOT:
make -C Build ios-all
This will build TeamTalk binaries for architectures armv7, arm64, i386 and x64.
CMake is able to build all TeamTalk's dependencies as so-called
ExternalProjects. All dependencies in TeamTalk's toolchain
can be activated using the CMake options prefixed TOOLCHAIN_
.
To e.g. have TeamTalk avoid building OPUS and instead use OPUS already installed on the host machine, call CMake like this:
cmake -DTOOLCHAIN_OPUS=OFF -S TeamTalk5 -B builddir
The following toolchain toggles are available:
TOOLCHAIN_BUILD_PREFIX
- Build toolchain dependencies in the specified directory
TOOLCHAIN_INSTALL_PREFIX
- Install dependencies in the specified directory
TOOLCHAIN_BUILD_EXTERNALPROJECTS
- When
ON
builds all TeamTalk's dependencies and installs them intoTOOLCHAIN_INSTALL_PREFIX
- When
OFF
will make TeamTalk binaries build using the libraries installed inTOOLCHAIN_INSTALL_PREFIX
. This is useful to avoid building the dependencies again after a new checkout or switching branch.
- When
TOOLCHAIN_OPENSSL
- When
ON
builds OpenSSL - When
OFF
uses OpenSSL installed on hostOFF
is only supported on Linux distributions and is recommended, since linking different versions of OpenSSL can cause problems.
- When
TOOLCHAIN_ACE
- When
ON
builds ACE Framework - When
OFF
uses ACE Framework installed on hostOFF
is only supported on Linux distributions
- Build ACE on Windows requires ActivePerl or Strawberry Perl
- Place
perl.exe
in %PATH%.
- Place
- When
TOOLCHAIN_TINYXML
- When
ON
builds TinyXML - When
OFF
uses TinyXML installed on hostOFF
is only supported on Linux distributions
- When
TOOLCHAIN_ZLIB
- When
ON
builds ZLib - When
OFF
uses ZLib installed on hostOFF
is recommended on Linux, Android, iOSOFF
is only supported on Linux distributions
- When
TOOLCHAIN_CATCH2
- When
ON
enables Catch2 for unit tests - When
OFF
ignore Catch2 unit tests
- When
TOOLCHAIN_LIBVPX
- When
ON
enables LibVPX - When
OFF
uses LibVPX installed on hostOFF
is only supported on Linux distributions
- Building LibVPX on Windows requires Cygwin, https://www.cygwin.com/
- Install Cygwin in
C:/cygwin64
- Install Cygwin in
- Building LibVPX on Windows requires yasm, http://yasm.tortall.net/
- Place
yasm.exe
for x64 inC:/tt5dist/yasm/x64
- Place
yasm.exe
for Win32 inC:/tt5dist/yasm/win32
- Place
- When
TOOLCHAIN_FFMPEG
- When
ON
builds FFmpeg - When
OFF
uses FFmpeg installed on host.OFF
is only supported on Linux distributions
- When
TOOLCHAIN_OGG
- When
ON
builds OGG - When
OFF
uses OGG installed on host.OFF
is only supported on Linux distributions
- When
TOOLCHAIN_OPUS
- When
ON
builds OPUS - When
OFF
uses OPUS installed on host.OFF
is only supported on Linux distributions
- When
TOOLCHAIN_PORTAUDIO
- When
ON
builds PortAudio - When
OFF
uses PortAudio installed on host.OFF
is only supported on Linux distributions
- When
TOOLCHAIN_SPEEX
- When
ON
builds Speex - When
OFF
uses Speex installed on host.OFF
is only supported on Linux distributions
- When
TOOLCHAIN_SPEEXDSP
- When
ON
builds SpeexDSP - When
OFF
uses SpeexDSP installed on host.OFF
is only supported on Linux distributions
- When
What features to build into the TeamTalk binaries are controlled by
CMake options prefixed by FEATURE_
.
To e.g. have TeamTalk built without OPUS support invoke CMake like this:
cmake -DFEATURE_OPUS=OFF -S TeamTalk5 -B builddir
The following feature toggles are available:
FEATURE_OPUS
- OPUS audio codec
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Raspbian, Windows
- Toolchain mapping:
TOOLCHAIN_OPUS
FEATURE_OPUSTOOLS
- OPUS .ogg file support
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Raspbian, Windows
FEATURE_SPEEX
- Speex audio codec
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Raspbian, Windows
- Toolchain mapping:
TOOLCHAIN_SPEEX
FEATURE_SPEEXDSP
- SpeexDSP for audio processing (resampler, denoiser, AGC)
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Raspbian, Windows
- Toolchain mapping:
TOOLCHAIN_SPEEXDSP
FEATURE_FFMPEG
- FFmpeg for streaming and audio resampling
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Raspbian
- Toolchain mapping:
TOOLCHAIN_FFMPEG
FEATURE_V4L2
- Video for Linux 2 for video capture support
- Supported platforms: Ubuntu/Linux, Raspbian
FEATURE_AVF
- Audio Video Foundation for video capture support
- Supported platforms: macOS
FEATURE_WEBRTC
- WebRTC for audio processing
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Windows
FEATURE_MSDMO
- Microsoft DirectX Media Object for audio resampling
- Supported platforms: Windows
FEATURE_MEDIAFOUNDATION
- Microsoft Media Foundation for audio and video streaming
- Supported platforms: Windows
FEATURE_LIBVPX
- libvpx (VP8) video codec
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Raspbian, Windows
- Toolchain mapping:
TOOLCHAIN_LIBVPX
FEATURE_OGG
- OGG file format
- Supported platforms: macOS, iOS, Android, Ubuntu/Linux, Raspbian, Windows
- Toolchain mapping:
TOOLCHAIN_OGG
FEATURE_PORTAUDIO
- PortAudio sound system
- Supported platforms: macOS, Ubuntu/Linux, Raspbian, Windows
- Toolchain mapping:
TOOLCHAIN_PORTAUDIO
FEATURE_OPENSLES
- OpenSL ES sound system
- Supported platforms: Android
FEATURE_AUDIOUNIT
- AudioUnit sound system
- Supported platforms: iOS
Which TeamTalk binaries to build are controlled by CMake options
prefixed by BUILD_TEAMTALK_
.
Most interesting are:
BUILD_TEAMTALK_DLL
- TeamTalk 5 shared library
- Builds binary
TEAMTALK_ROOT/Library/TeamTalk_DLL/TeamTalk5.dll
orlibTeamTalk5.so
BUILD_TEAMTALK_PRODLL
- TeamTalk 5 Pro shared library
- Builds binary
TEAMTALK_ROOT/Library/TeamTalk_DLL/TeamTalk5Pro.dll
orlibTeamTalk5Pro.so
BUILD_TEAMTALK_LIB
- TeamTalk 5 static library used for iOS and Android
- Builds binary
TEAMTALK_ROOT/Library/TeamTalk_DLL/libTeamTalk5.a
BUILD_TEAMTALK_PROLIB
- TeamTalk 5 Pro static library used for iOS and Android
- Builds binary
TEAMTALK_ROOT/Library/TeamTalk_DLL/libTeamTalk5Pro.a
BUILD_TEAMTALK_SRVEXE
- TeamTalk 5 console/daemon server
- Builds binary
TEAMTALK_ROOT/Server/tt5srv.exe
ortt5srv
BUILD_TEAMTALK_PROSRVEXE
- TeamTalk 5 Pro console/daemon server
- Builds binary
TEAMTALK_ROOT/Server/tt5prosrv.exe
ortt5prosrv
BUILD_TEAMTALK_SVCEXE
- TeamTalk 5 NT service server
- Builds binary
TEAMTALK_ROOT/Server/tt5svc.exe
BUILD_TEAMTALK_PROSVCEXE
- TeamTalk 5 NT service server
- Builds binary
TEAMTALK_ROOT/Server/tt5prosvc.exe