Version:

Waf Project Settings

Waf Project Settings

When defining a project’s build settings (wscript), you can specify several different project settings for the build modules to configure the correct parameters for the project.

The following table provides the valid attributes for the different build modules.

Build attributes

AttributeDescriptionTarget to Platform or Configuration
additional_manifestsAdditional manifests to add to MSVC applicationsY
additional_settingsContainer that groups compile settings and acts upon them recursively; useful for specifying options for particular files in a project For example, you can disable precompiled headers for a specific file using the following:

additional_settings = Settings ( files = ‘my_file.cpp’, disable_pch=True )
Y
build_in_dedicatedTrue by default; if False, the module will not be built when building in dedicated server modeN
cflagsAdditional C flags to pass to the compilerY
cxxflagsAdditional CXX flags to pass to the compilerY
definesList of additional pre-processor defines for the projectY
enable_rttiEnable RTTI for a particular moduleY
export_definesList of definitions to add to the module that has a ‘use’ dependency on the current moduleY
export_definitionsList of export definitions to export using the /DEF: compiler optionY
export_includesList of Additional include paths to add to the module that has a ‘use’ dependency on the current moduleY
featuresAdditional custom features to apply to the project during the buildY
file_listList of file specs that contain the files to include in the projectY
filesList of files to include for the moduleN
force_dynamic_crtForces the use of dynamic runtime CRT for the projectN
force_static_crtForces the use of static runtime CRT for the projectN
framework(Darwin) Specifies the framework to useY
frameworkpath(Darwin) Specifies additional paths to search for frameworksY
includesAdditional include paths for the moduleY
libAdditional input libraries to link againstY
libpathAdditional library paths for the moduleY
linkflagsAdditional linker flags to pass to the linkerY
meta_includesAdditional meta includes for WinRT using the /AI compiler optionY
need_deployHint to deploy the module before debugging in Visual StudioN
output_sub_folderOptional subfolder under the target output folder in which to copy the module binaryN
pchSpecifies the precompiled header (PCH) file, if in useN
platformsList of platforms to restrict the module to build on; if missing, a specific platform will not be targeted at the project definition levelN
priority_includesSame as the includes paths, except this include list is added prior to the ones defined in the includes pathsN
sourceList of source files to add directly to the projectN
targetProject name of the targetN
useList of static library modules that are part of the Waf build to which you can add dependencies and static linksY
uselibAdd a dependency on a 3rd party library by nameY
vs_filterFolder filter in the generated solution file where this project existsN

Platform and Configuration Targeting

If allowed (refer to the third column in the table above), you can set an attribute value to apply only under certain target platforms and configurations. Each attribute can be universal for all builds or targeted specifically to a platform/configuration combination:

  • [Attribute] – Applies to any target platform/configuration for the attribute
  • [target_platform]_[attribute] – Applies to any configuration for a specific target platform for the attribute
  • [configuration]_[attribute] – Applies to a specific configuration for any target platform for the attribute
  • [target_platform]_[configuration]_[attribute] – Applies to a specific target platform and configuration for the attribute

Features

The Lumberyard Waf system allows the use of custom features to add functionality to a project’s build pipeline.

Build features

FeatureDescription
qt5Passes files through the QT5 moc processor
generate_rc_fileCreates an RC file and copies the resources, such as the icon file; win_x64 only
wwiseSets the following for building and linking against Wwise: environment, includes, libraries, and library paths
GoogleMockSets the following for building and linking against Google Mock: environment, includes, libraries, and library paths
AWSNativeSDKSets the following for building and linking against the AWS Native SDK library: environment, includes, libraries, and library paths
AWSGameLiftSets the following for building and linking against the AWS GameLift library: environment, includes, libraries, and library paths
GridMateSets the following for building and linking against the GridMate library: environment, includes, libraries, and library paths