Build Instructions

Overview

Building the Steam Audio Unreal integration involves the following steps:

  1. Building the plugin. This step involves compiling C++ code, and must be done separately on each supported platform.

  2. (Optional) Generating the zip file (steamaudio_unreal.zip) for distribution.

Directory Structure

Below is an overview of the directories contained within the source repository for the Steam Audio Unreal plugin:

Directory

Contents

bin/

Compiled binaries placed by the INSTALL target of the build system generated by CMake.

build/

Build scripts and the build system generated by CMake.

dist/

The zip file generated by the PACKAGE target.

doc/

Documentation.

src/

C++ source code for the plugin.

Building the plugin

Requirements

To build the native plugin on any platform, you need the following software:

To build the Windows plugin, you will need:

To build the Linux plugin, you will need:

To build the macOS plugin, you will need:

  • Xcode 11.3 or later (install from the Mac App Store)

To build the Android plugin, you will need:

To build the iOS plugin, you will need:

  • Xcode 14.0 or later (install from the Mac App Store)

To build the documentation, you will need:

Preparing the repository

After cloning the Steam Audio Git repository, the first step is to download the Steam Audio API libraries and place them in the correct locations in the Git repository. To do this, run the following from a command prompt in the unreal directory of the repository:

$ python setup.py

This will download the appropriate release of the Steam Audio API from GitHub, extract it, and place the files in the appropriate locations.

Building using the build script

To build the plugin, run the following from a command prompt in the unreal directory of the repository:

$ cd build
$ python build.py

On Windows, this will build the plugin for the Win64 (Windows 64-bit) platform.

On macOS, this will build the plugin for the Mac platform.

If CMake cannot generate the build system due to missing dependencies, you can run CMake directly and adjust settings that control where CMake looks for dependencies, and which targets it builds.

The Steam Audio build script (build.py) lets you specify the following command line parameters to control its behavior:

-o, --operation NAME

Specifies the CMake operation to perform. Valid options are generate (generates the build system), build (build all targets in the build system), install (runs the INSTALL target, which copies binaries to the bin/ folder), package (runs the PACKAGE target, which generates the zip file and copies it to the dist/ folder), ci_build (which runs generate, then build, then install), and ci_package (which runs generate, then package). Default is generate followed by build.

Building using CMake directly

You can also directly using CMake to generate the build system. This is useful if you need to specify non-default paths for CMake to search for dependencies. To do this, first create the directory in which you want to generate the build system:

$ cd build
$ mkdir windows-vs2019-x64

Now run CMake:

$ cmake ../..

Alternatively, use cmake-gui if you prefer using a GUI to configure various CMake options:

$ cmake-gui ../..

You will typically want to generate a build system for your host platform’s native toolchain (e.g. Visual Studio on Windows or Xcode on macOS), since Steam Audio’s CMake-based build system is just a thin wrapper around UnrealBuildTool, which will handle toolchain selection and cross-compiling automatically.

Below are some of the CMake options you may want to configure:

Option

Description

STEAMAUDIOUNREAL_BUILD_DOCS

TRUE if you want to build documentation, FALSE otherwise.

STEAMAUDIO_CROSSCOMPILE_WIN32

TRUE if you want to compile for 32-bit Windows, FALSE otherwise.

STEAMAUDIO_CROSSCOMPILE_LINUX

TRUE if you want to cross-compile for Linux on Windows, FALSE otherwise.

STEAMAUDIO_CROSSCOMPILE_ANDROID

TRUE if you want to cross-compile for Android on Windows, FALSE otherwise.

STEAMAUDIO_CROSSCOMPILE_IOS

TRUE if you want to cross-compile for iOS on macOS, FALSE otherwise.

Sphinx_EXECUTABLE_DIR

Absolute path to the directory containing the Sphinx executable.

Unreal_EXECUTABLE_DIR

Absolute path to the directory containing the UnrealBuildTool executable.

Generating the zip file

As an optional step, you can package the plugin, including documentation, into a zip file. To do this, run the following from a command prompt in the unreal directory of the repository:

$ cd build
$ python build.py -o install
$ python build.py -o package

This will place the generated zip file in dist/steamaudio_unreal.zip.