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 exports a few helper scripts under lib/cmake/mrs-sdk-qt/toolchains for bootstrapping CMake with the right Qt version:

FileQt versionTarget OS identifier
qt5-buildroot.cmakeBuildroot Qt 5.9.1buildroot
qt5-yocto.cmakeYocto Qt 5.12.9yocto
qt5-desktop.cmakeDesktop Qt 5.15desktop
qt6-desktop.cmakeDesktop Qt 6.8desktop

Each helper sets cache variables used in lib/cmake/mrs-sdk-qt/config.cmake to compute a consistent kit identity. When creating SDK kits, you’ll pass the location of this helper with something like -DCMAKE_TOOLCHAIN_FILE=lib/cmake/mrs-sdk-qt/toolchains/qt5-yocto.cmake.

In addition to configuring the helper script to use, you’ll have to tell the kit which MRS product it targets.


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_TARGET_DEVICE=Desktop
    QMAKE_TOOLCHAIN_FILE=<path-to-sdk-installation>/current/lib/qmake/mrs-sdk-qt/toolchains/qt6-desktop.pri

    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:

    -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
    -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
    -DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
    -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
    -DCMAKE_TOOLCHAIN_FILE:STRING=<path-to-mrs-sdk-installation>/current/lib/cmake/mrs-sdk-qt/toolchains/qt6-desktop.cmake

    Qt Creator kit CMake config for desktop Qt6

  12. Your Desktop Qt6 kit is now complete and ready to use with the MRS SDK!

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_TARGET_DEVICE=Desktop
    QMAKE_TOOLCHAIN_FILE=<path-to-sdk-installation>/current/lib/qmake/mrs-sdk-qt/toolchains/qt5-desktop.pri

    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:

    -DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
    -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
    -DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
    -DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
    -DCMAKE_TOOLCHAIN_FILE:STRING=<path-to-mrs-sdk-installation>/current/lib/cmake/mrs-sdk-qt/toolchains/qt5-desktop.cmake

    Qt Creator kit CMake config for desktop Qt5

  12. Your Desktop Qt5 kit is now complete and ready to use with the MRS SDK!