Version

menu_open
Wwise SDK 2021.1.14
Configuring Your Project With Premake

The premake command generates the solutions that will be used by the build command to build your plug-in. The default Premake configuration file generated by the new command works out of the box, however, further modifications will be needed to work on your plug-in. The generated solutions should not be modified directly as calling the premake command again will overwrite all changes to these files. Instead, modify the Premake configuration file. This configuration file is located at the root of your plug-in and is named PremakePlugin.lua.

Looking at the PremakePlugin.lua, notice how it is divided into three similar sections. Each section contains a table with various lists of strings that are used to configure how a solution is generated:

  • The Plugin.sdk.static table is used to configure the static SDK plug-in.
  • The Plugin.sdk.shared table is used to configure the shared SDK plug-in, which links to the static SDK plug-in (this is done under the hood by premake scripts).
  • The Plugin.authoring table is used to configure the Authoring plug-in, which links to the static SDK plug-in.

Further information on how to populate each list is found in the Premake documentation:

Once the plug-in project has been created, other commands, such as premake, must be called from within the project folder. Here is how to generate the solutions for Authoring on the current operating system:

cd MyNewFX
python "%WWISEROOT%/Scripts/Build/Plugins/wp.py" premake Authoring

Available platforms are:

Android, Authoring, Authoring_Windows, Authoring_Linux, Authoring_Mac, WinGC, GGP, XboxOneGC, iOS, Linux, LinuxAuto, Mac, NX, PS4, PS5, QNX, tvOS, UWP_vc140, UWP_vc150, UWP_vc160, Windows_vc140, Windows_vc150, Windows_vc160, XboxOne, XboxSeriesX

When the solutions are generated, refer to Building Your Project for the Different Wwise Platforms to build and install your plug-in in your Wwise installation.

Static Authoring Configuration

Even though it is not included in the generated PremakePlugin.lua file, there is also an optional Plugin.sdk.authoringstatic table. This is used for unique use cases and provides a different configuration for the static SDK plug-in that is linked to the Authoring plug-in. For example, this demonstrates how to re-use the same SDK plug-in code with a FOR_AUTHORING compiler define:

Plugin.sdk.staticauthoring = {}
-- SDK STATIC AUTHORING PLUGIN SECTION
Plugin.sdk.staticauthoring.includedirs = Plugin.sdk.static.includedirs
Plugin.sdk.staticauthoring.files = Plugin.sdk.static.files
Plugin.sdk.staticauthoring.excludes = Plugin.sdk.static.excludes
Plugin.sdk.staticauthoring.links = Plugin.sdk.static.links
Plugin.sdk.staticauthoring.libdirs = Plugin.sdk.static.libdirs
Plugin.sdk.staticauthoring.defines = table.join(Plugin.sdk.static.defines, { "FOR_AUTHORING" })

Advanced Premake Configuration

Notice how configuring a project is fairly straightforward since most of the Premake code is hidden in the configuration table. For a more advanced configuration, add a custom field to any of the following configuration sections:

Plugin.sdk.static.custom = function()
-- put your Premake code here
end
Plugin.sdk.shared.custom = function()
-- put your Premake code here
end
Plugin.authoring.custom = function()
-- put your Premake code here
end

Next section: Building Your Project for the Different Wwise Platforms


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise