Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
Build System Customization

The following configuration parameters can be used to change the behavior of the Z-Wave Build System.

The configuration parameters can be passed to cmake on command line or set in the project's CMakeLists.txt file.

Note
When setting the parameters in the CMakeLists.txt, it must be set before the call to add_subdirectory(tridentiot-sdk/z-wave).

ZWSDK_CONFIG_REGION

Compile for a specific region.

See zpal_radio_region_t for a list of valid regions.

Default behavior if not set is to generate targets for all regions.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_REGION=REGION_US
@ REGION_US
Radio is located in Region US. 2 Channel region.
Definition zpal_radio.h:343

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_REGION REGION_US)

ZWSDK_CONFIG_TR_CLI

Add CLI to applications.

Example of use on command line:

cmake --preset T32CZ20.Release -DZWSDK_CONFIG_TR_CLI=1

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_TR_CLI 1)

The default behavior is that the CLI is added to applications in Debug build but not in Release build.

ZWSDK_BUILD_SAMPLE_APPLICATIONS

If set to ON, all sample applications are compiled.

Example of use:

cmake --preset T32CZ20.Debug -DZWSDK_BUILD_SAMPLE_APPLICATIONS=ON

This configuration parameter only applies if the SDK is used as a subproject by invoking add_subdirectory(<SDK path>) from a parent CMake project. This is default structure for a project generated by elcap.

If included as a subproject, the default behavior is to skip compiling sample applications (OFF).

ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH

Set the path to a custom private key used for signing binaries.

The path must be absolute.

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH="absolute/path/to/private_signing_key"

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH "absolute/path/to/private_signing_key")

CMake has a built-in variable that can be used to create the absolute path. If a key is located in the project directory under keys/, ${CMAKE_SOURCE_DIR} can be used.

Example:

set(ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH "${CMAKE_SOURCE_DIR}/keys/my_private_signing_key.pem")
Note
Both private and public keys must be defined if custom keys are used.

ZWSDK_CONFIG_PUBLIC_SIGNING_KEY_PATH

Set the path to a custom public key used for signing binaries.

The path must be absolute.

Example: See ZWSDK_CONFIG_PRIVATE_SIGNING_KEY_PATH.

ZWSDK_CONFIG_USE_SOURCES

Instructs the build system to compile all sources instead of linking pre-built libraries.

Valid values:

  • ON
  • OFF (default)

Example of use on command line:

cmake --preset T32CZ20.Debug -DZWSDK_CONFIG_USE_SOURCES=ON

Example of use in CMakeLists.txt:

set(ZWSDK_CONFIG_USE_SOURCES "ON")