Skip to content

Configure a Project

Qt projects using the SDK now consume installed CMake packages directly.

  1. Install or extract the SDK artifacts for one target into a single prefix.
  2. Point CMAKE_PREFIX_PATH at that installed SDK prefix.
  3. Use normal find_package(...) calls in your application.
cmake_minimum_required(VERSION 3.23)

project(my-app LANGUAGES CXX)

find_package(MRXQtCore 0.1 CONFIG REQUIRED)
find_package(MRXQtCan CONFIG REQUIRED)
find_package(MRXQtUtils CONFIG REQUIRED)

add_executable(my-app main.cpp)
target_compile_features(my-app PRIVATE cxx_std_11)
target_link_libraries(my-app PRIVATE MRXQt::Core MRXQt::Can MRXQt::Utils)

If you use Qt Creator, initialize your project presets with mrxqt-setup:

mrxqt-setup init-project \
  --project /path/to/customer-app \
  --target mconn-buildroot-qt5.9 \
  --sdk-prefix /opt/mrxqt-sdk/0.1.0/mconn-buildroot-qt5.9 \
  --toolchain share/mrxqt/toolchains/buildroot-qt5.9.cmake

That command writes or updates CMakeUserPresets.json so Qt Creator can configure the project with the correct SDK prefix and toolchain.