Compilation mode modifiers are compilation options that modify the way the project is compiled in some way.

BUILD_VARIANT_STATIC option

By default, BUILD_VARIANT_STATIC is left to OFF. When set to ON all shared libraries are converted to static ones, including the framework and project libraries.

When set to OFF the behaviour is the following:

Meanwhile, when set to ON:

Enabling static mode

To enable it, use the CMake CLI like this:

cmake .. -DBUILD_VARIANT_STATIC=ON

or hardcode the CMakeLists.txt file where the following line:

option(BUILD_VARIANT_STATIC "Builds the Framework, application library(exists only on Unix) and executable into a single
    executable binary" OFF)

should look like this:

option(BUILD_VARIANT_STATIC "Builds the Framework, application library(exists only on Unix) and executable into a single
    executable binary" ON)

Additionally, to be able to export to production in static mode, overriding the default setting in the uvproj.yaml file is also needed. By default, it should look like this:

name: "MyApplication"
version: "1.0.0.0"
engine-version: "1.0.0.0"
build-mode-static: false
build-mode-vendor: true

Changing the build-mode-static field, enabled/disables static mode

Exports

When enabled, the UIMGUI_BUILD_VARIANT_STATIC macro is defined.

BUILD_VARIANT_VENDOR option

The BUILD_VARIANT_VENDOR option allows the user to change which libraries the framework and application uses when compiling. By default, it is set to ON, which will use the framework's vendored third party libraries, otherwise it will search for the system equivalents.


Some libraries may be vendored even if system equivalents are there. In most cases, this is due to code incompatibility between the last release version and latest commit version. The following libraries are always vendored:

  1. No libraries right now!

* This wiki will be updated when a library is moved to an "always-vendored" state.

Enabling static mode

Note

Setting vendored mode to OFF is not supported on Windows. Changes to the setting will not take effect.

To enable it, use the CMake CLI like this:

cmake .. -DBUILD_VARIANT_VENDOR=ON

or hardcode the CMakeLists.txt file where the following line:

option(BUILD_VARIANT_VENDOR "If set to OFF will use the globally installed framework(not available on Windows)" ON)

should look like this:

option(BUILD_VARIANT_VENDOR "If set to OFF will use the globally installed framework(not available on Windows)" OFF)

Additionally, to be able to export to production in vendor mode, overriding the default setting in the uvproj.yaml file is also needed. By default, it should look like this:

name: "MyApplication"
version: "1.0.0.0"
engine-version: "1.0.0.0"
build-mode-static: false
build-mode-vendor: true

Changing the build-mode-vendor field, enabled/disables static mode

Exports

When enabled, the UIMGUI_BUILD_VARIANT_VENDOR macro is enabled.