Architecture and Platform-specific Build Settings

Qt Quick Ultralite is split into the core library and the platform library. The compile settings for each of these components can be reused for multiple projects.

Set the architecture for the board using the QUL_PLATFORM_ARCHITECTURE CMake variable in each BoardArchitectureConfig.cmake.

set (QUL_PLATFORM_ARCHITECTURE "cortex-m7-hf-fpv5-d16")

The default architectures supported by Qt Quick Ultralite can be found in platform\architecture. CMake looks for a matching architecture for the given string and loads the presets defined for it.

Using Custom Architectures

In case your CPU does not fit one of the predefined architectures, you can create your own. A custom architecture name, that does ot clash any of the existing ones, and the location of the file where CMake is supposed to read your custom settings from need to be specified.


When setting the two variables shown above, all other architecture handling will be disabled. You can take one of the files from platform\architecture as base for your custom file.

Settings Propagation

To pass compile settings for the different parts of the projects CMake interface libraries are used. These are not actual libaries, but can inherit settings. In order to inherit these settings to your application you need to link against them. For standard use, when you register your application using qul_add_target, this is done automatically.

Available Compile Settings


The library target Qul::PlatformArchitecture contains the settings that are specific for your CPU architecture.

target_link_options(PlatformArchitecture INTERFACE
target_compile_options(PlatformArchitecture INTERFACE


The library Qul::Platform contains settings that are specific for your platform, for applications that are using APIs provided by Qt Quick Ultralite.

Platform SDK Config

The library Qul::PlatformBSPConfig contains settings that are required for applications that need access to SDK specific functions and headers. Like hardware specific context funtions or interrupt handlers. Applications only using Qt Quick Ultralite provided APIs don't need to link this.

See the porting guide for Specifying vendor SDK specific settings.

Linker Scripts

The library Qul::PlatformDefaultLinkerScript contains settings for default linker scripts. These are specified by each platform in its LinkerScriptConfig.cmake by calling the CMake function


See Adding your linker script for an example.

This function can be called multiple times, in case your platform needs multiple linker scripts. It will add each linker script to the library Qul::PlatformDefaultLinkerScript.

In order to pass the linker script to your application you need to link against this library. When adding your application using the function qul_add_target, this is done automatically.

In case you want to handle linker scripts yourself, and not have any automatic handling, you can set the variable QUL_NO_DEFAULT_LINKER_SCRIPT. This prevents any linker script from being added to your application.

Custom Optimization for Core Library

Usually the core library is built platform independent. In case your platform requires custom compile settings for the core library, eg. for optimization, coreLibrary.cmake can be created in the cmake folder of your platform. This file can set additional flags to the Core target.

Note: This file is only loaded when the Qt Quick Ultralite core library and platform library are built together.

Available under certain Qt licenses.
Find out more.