Skip to content

CMake

Creating Simple Installers with CPack

In my recent post Benefits of a Relocatable Qt, I explained how to relocate Qt from a build server to a developer PC and from the PC to an embedded system. Qt is installed in three different locations. My solution has two small deficiencies. First, it sets the install rpath to an absolute path and restricts the installation to this absolute path. Second, it forces us to create a tarball of the installation directory on the PC manually. Let us fix these two deficiencies.

Read More »Creating Simple Installers with CPack

Benefits of a Relocatable Qt

Bob builds Qt for the development team on a fast compute server. He packs Qt into a tarball and hands the tarball to his teammates. Alice installs the Qt tarball on her PC in a directory that differs from the installation directory used by Bob. As the target embedded system runs on an AMD Ryzen SoC with x86_64 architecture like the build server and the development PC, Alice installs Qt on the target system – yet in another directory. She can then try out the latest changes of her app directly on the target system. As Qt is relocatable since version 5.14, Alice’s and Bob’s jobs have become quite a bit easier.

Read More »Benefits of a Relocatable Qt

Deploying Qt Projects to Embedded Devices with CMake

When you run a Qt project, QtCreator first deploys the project to a remote embedded Linux device via ssh and then runs the executable on the remote device. This feature enables nearly instant feedback how your Qt application works on the embedded device.

Deployment works fine with the INSTALLS variable of qmake. It does not work out of the box with the install functions of CMake. Fortunately, the Qt trolls provide a workaround. I’ll explain the workaround with an example CMakeLists.txt file.

Read More »Deploying Qt Projects to Embedded Devices with CMake

CMake Cross-Compilation Based on Yocto SDK

We have succeeded in building embedded Linux with Yocto for a quad-core NXP i.MX6 (ARM Cortex-A9). Next, we want to cross-compile our own Qt application. As we use CMake for building our Qt application, we must create a CMake toolchain file. I am going to give a line-line by line explanation of the CMake toolchain file. I used Yocto Morty and CMake v3.5.1 (as it comes with Ubuntu 16.04 LTS).
Read More »CMake Cross-Compilation Based on Yocto SDK