Configure a Project
Qt projects using the SDK now consume installed CMake packages directly.
- Install or extract the SDK artifacts for one target into a single prefix.
- Point
CMAKE_PREFIX_PATHat that installed SDK prefix. - Use normal
find_package(...)calls in your application.
Example
Section titled “Example”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)Qt Creator workflow
Section titled “Qt Creator workflow”If you use Qt Creator, initialize your project presets with mrsqt-setup:
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.cmakeThat command writes or updates CMakeUserPresets.json so Qt Creator can configure the project with the correct SDK prefix and toolchain.