Skip to content

Set Up Build Kits

The MRS SDK for Qt leverages Qt Creator kits to cross-compile projects for various MRS products.

NOTE: Qt Creator is installed by default in the standard MRS SDK VM. If you are using the standard VM (and do not need to update Qt Creator), skip to kit setup.

If you have never installed Qt before, or do not have the Qt Maintenance Tool, use the Qt Online Installer steps. If you have installed Qt before, but didn’t install Qt Creator or want to update it, use the Qt Maintenance Tool steps.

NOTE: these steps are based on version 4.10.0 of the Qt Online Installer.

  1. Create a new Qt account: https://login.qt.io/register

  2. Download the Qt Online Installer from here: https://my.qt.io/download

    • If you are using an Ubuntu/Linux VM, use the Linux x64 installer
  3. Run the installer (make it executable if on Linux). Log in with your Qt credentials and accept the licenses.

  4. Choose a directory to install Qt. The default of $HOME/Qt is fine, or you can choose a different location.

  5. You will be presented with a list of components available to be installed. Choose Qt Creator:

    selecting-qt-creator-in-qt-online-installer

  6. When you reach the “You are installing” screen, you should see only Maintenance Tool and Qt Creator.

  7. Click Install to finish the installation.

Most users will not need to set up all of the possible SDK kits. For example, if you have only NeuralPlex devices, you will only need 1 of the 5 kits to work on your projects.

The following table summarizes which kits you’ll need:

ProductKits Required
NeuralPlexdesktop-qt6
MConnmconn-yocto, mconn-buildroot, desktop-qt5
FUSIONfusion-buildroot, desktop-qt5

NOTE: any contributors to the SDK project will need to set up all kits in order to have full testing capabilities.

The SDK ships installable toolchain files under share/mrsqt/toolchains/ inside the target-support package:

FileQt versionTarget OS identifier
buildroot-qt5.9.cmakeBuildroot Qt 5.9buildroot
native-qt5.15.cmakeDesktop Qt 5.15native
native-qt6.8.cmakeDesktop Qt 6.8native
yocto-qt5.cmakeYocto Qt 5.12yocto

Each helper is referenced from the CMakeUserPresets.json entries generated by mrsqt-setup init-project, so consumer projects do not need to maintain their own copied wrapper files.

In addition to selecting the helper script, your preset or kit still needs to target the correct MRS product SDK root.


Setup steps coming soon!

Setup steps coming soon!

Setup steps coming soon!

NOTE: these steps are based on version 13.0.0 of Qt Creator, which is the version installed by default in the MRS SDK VM.

  1. Open Qt Creator and go to Edit > Preferences > Kits.

  2. There will be a few tabs across the top of the window. Go to Qt Versions.

  3. Add the Qt 6.8 version by selecting its qmake program, located at /opt/Qt/6.8.0/gcc_64/bin/qmake:

    Qt Creator Qt version config for desktop Qt6

  4. Go to Compilers. Verify the C/C++ compilers were auto-detected:

    Qt Creator compiler config for desktop Qt6

    There may be multiple compiler options on your system even if only one was auto-detected. Look for paths like /usr/bin/gcc, /bin/gcc, or /usr/lib/ccache/gcc. Run apt install build-essential to install the GNU compilers if necessary.

  5. Go to Debuggers. Verify a system GDB debugger was auto-detected:

    Qt Creator debugger config for desktop Qt6

    Look for paths like /usr/bin/gdb or /bin/gdb. Run apt install gdb to install the GDB debugger if necessary.

  6. Navigate to the CMake section in the sidebar, then go to the Tools tab.

  7. Verify a system CMake tool was auto-detected:

    Qt Creator CMake config

    Look for the path /usr/bin/cmake. Run apt install cmake to install CMake if necessary.

  8. Now that all the kit’s components have been verified, it’s time to create the kit! Navigate back to Kits.

  9. Click Add to add a new kit. Edit the configuration to match this:

    Qt Creator kit full config for desktop Qt6

    Make sure the proper compiler, debugger, and CMake tool are selected.

  10. Next, you’ll need to add some environment variables to configure the SDK. Click the Change… button for the Environment configuration and add the following, inserting the path to your MRS SDK installation:

    MRS_SDK_QT_ROOT=<path-to-mrs-sdk-installation>
    MRS_SDK_QT_TOOLCHAIN_ID=desktop-qt6
    MRS_SDK_QT_TARGET_DEVICE=Desktop

    Qt Creator kit build environment config for desktop Qt6

  11. Finally, you need to verify CMake is configured for the SDK properly. Click the Change… button next to CMake Configuration and add the following, inserting the path to your MRS SDK installation:

    -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
    -DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
    -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
    -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/opt/mrsqt-sdk/0.1.0/native-qt6.8/share/mrsqt/toolchains/native-qt6.8.cmake
    -DMRS_SDK_QT_TOOLCHAIN_ID:STRING=desktop-qt6
    -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}

    Qt Creator kit CMake config for desktop Qt6

  12. Your Desktop Qt6 kit is now complete and ready to use with the MRS SDK! To make sure everything is working properly, verify your kit setup.

NOTE: these steps are based on version 13.0.0 of Qt Creator, which is the version installed by default in the MRS SDK VM.

  1. Open Qt Creator and go to Edit > Preferences > Kits.

  2. There will be a few tabs across the top of the window. Go to Qt Versions.

  3. Add the Qt 5.15 version by selecting its qmake program, located at /opt/Qt/5.15.0/gcc_64/bin/qmake:

    Qt Creator Qt version config for desktop Qt5

  4. Go to Compilers. Verify the C/C++ compilers were auto-detected:

    Qt Creator compiler config for desktop Qt5

    There may be multiple compiler options on your system even if only one was auto-detected. Look for paths like /usr/bin/gcc, /bin/gcc, or /usr/lib/ccache/gcc. Run apt install build-essential to install the GNU compilers if necessary.

  5. Go to Debuggers. Verify a system GDB debugger was auto-detected:

    Qt Creator debugger config for desktop Qt5

    Look for paths like /usr/bin/gdb or /bin/gdb. Run apt install gdb to install the GDB debugger if necessary.

  6. Navigate to the CMake section in the sidebar, then go to the Tools tab.

  7. Verify a system CMake tool was auto-detected:

    Qt Creator CMake config

    Look for the path /usr/bin/cmake. Run apt install cmake to install CMake if necessary.

  8. Now that all the kit’s components have been verified, it’s time to create the kit! Navigate back to Kits.

  9. Click Add to add a new kit. Edit the configuration to match this:

    Qt Creator kit full config for desktop Qt5

    Make sure the proper compiler, debugger, and CMake tool are selected.

  10. Next, you’ll need to add some environment variables to configure the SDK. Click the Change… button for the Environment configuration and add the following, inserting the path to your MRS SDK installation:

    MRS_SDK_QT_ROOT=<path-to-mrs-sdk-installation>
    MRS_SDK_QT_TOOLCHAIN_ID=desktop-qt5
    MRS_SDK_QT_TARGET_DEVICE=Desktop

    Qt Creator kit build environment config for desktop Qt5

  11. Finally, you need to verify CMake is configured for the SDK properly. Click the Change… button next to CMake Configuration and add the following, inserting the path to your MRS SDK installation:

    -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
    -DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
    -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
    -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/opt/mrsqt-sdk/0.1.0/native-qt5.15/share/mrsqt/toolchains/native-qt5.15.cmake
    -DMRS_SDK_QT_TOOLCHAIN_ID:STRING=desktop-qt5
    -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}

    Qt Creator kit CMake config for desktop Qt5

  12. Your Desktop Qt5 kit is now complete and ready to use with the MRS SDK! To make sure everything is working properly, verify your kit setup.

NOTE: these steps are based on version 13.0.0 of Qt Creator, which is the version installed by default in the MRS SDK VM.

You can use the demo applications included in the SDK to test out your kit configurations.

  1. Install the target-support archive and the module archives you need into one SDK prefix.

  2. Configure the local product SDK or host Qt root for that target.

    Terminal window
    /opt/mrsqt-sdk/0.1.0/mconn-buildroot-qt5.9/bin/mrsqt-setup config set \
    --target mconn-buildroot-qt5.9 \
    --product-sdk-root /opt/product-sdks/mconn-buildroot
    /opt/mrsqt-sdk/0.1.0/mconn-buildroot-qt5.9/bin/mrsqt-setup init-project \
    --project /path/to/demo \
    --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
  3. Open the demo project in Qt Creator (docs here). Qt Creator will pick up the generated CMakeUserPresets.json and configure the project with the generated preset.

    Qt Creator running CMake configure for desktop Qt5

  4. Click the Run button in the lower left-hand corner (or press Ctrl + R) to build and run the project. You should see successful compilation followed by a successful run of the demo app.

    Qt Creator building and running the spoke-zone-demo application

  5. Your kit is ready to go!