Qmix SDK  20200506
The software libraries for integration of all CETONI devices.
Building the QmixSDK on Linux

Checkout cetoni_repository

Checkout the cetoni_repository git repository into a local folder, such as ~/cetoni_repository.

Environment variables

For the build the following environment variables are required:

  • cetoni_repository - this variable needs to contain the root of the cetoni_repository -if you followed the example above, then it should point to ~/cetoni_repository
  • local_prefix - this variable contains the target folder for the built libraries. For example, if the local_prefix is /home/user/Coding then the libraries will be stored into /home/user/Coding/lib. This is also the path where the linker searches for the libraries.
  • x64 - Set this variable to 1 for 64-bit build (this is mandatory for Linux build)

The following example shows the etc/profile.d/envvars.sh file that is used at CETONI to define the environment variables.

export QTDIR="/usr/lib/x86_64-linux-gnu"
export PATH=$QTDIR:$QTDIR/bin:$PATH
export cetoni_repository="/home/user/Coding/cetoni_repository"
export local_prefix="/home/user/Coding"

To add the local_prefix folder to the LD_LIBRARY_PATH variable we added the file cetoni_repository.conf to the folder /etc/ld.so.cond.d/ with the following content:

# cetoni repository files are stored in local user directory
/home/user/Coding/lib

Build

Create a build folder for out of tree build.

CD into the build folder and execute:

qmake -recursive ${cetoni_repository}/usl/cetoni_libs_essentials.pro

You should see something like this:

...
Project MESSAGE: QMAKESPEC=/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
Project MESSAGE: Using USL with Qt platform layer
Project MESSAGE: Using USL with native Unix platform layer
Project MESSAGE: Using USL with Qt platform layer
Project MESSAGE: Using USL with native Unix platform layer
Project MESSAGE: Building for 64-bit
Project MESSAGE: usrlibs: /home/user/Coding/lib
Project MESSAGE: local_libs: /home/user/Coding/lib
Project MESSAGE: Building with g++
Project MESSAGE: QMAKESPEC=/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
Project MESSAGE: Using USL with Qt platform layer
Project MESSAGE: Using USL with native Unix platform layer
Project MESSAGE: Using USL with Qt platform layer
Project MESSAGE: Using USL with native Unix platform layer

Then build the project with make:

make -j4

Checkout QmixSDK Project

Checkout the QmixSDK git project into a local folder such as ~/QmixSDK

Create QmixSDK install archive

CD into the QmixSDK install subfolder:

cd ~/QmixSDK/install

and run the setup.sh script

./setup.sh

This will build the doxygen documentation, copy all required files into the QmixSDK_Linux subfolder and creates the final QmixSDK_Linux.tar.gz and QmixSDK_Linux.zip files.