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(MRSQtCore 0.1 CONFIG REQUIRED)
find_package(MRSQtUtils CONFIG REQUIRED)
add_executable(my-app main.cpp)
target_compile_features(my-app PRIVATE cxx_std_11)
target_link_libraries(my-app PRIVATE MRSQt::Core MRSQt::Utils)

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

Terminal window
mrsqt-setup init-project \
--project /path/to/customer-app \
--target mconn-buildroot-qt5.9 \
--sdk-prefix /opt/mrsqt-sdk/0.1.0/mconn-buildroot-qt5.9 \
--toolchain share/mrsqt/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.