Skip to main content

Building Own Application for Linux with a Wayland Display Server

Generate Makefiles with CMake

For general information about CGI Studio Build System and CMake properties available to configure Candera applications refer to CGI Studio Build System.

To configure and generate makefiles for compiling the CGI Player, follow below steps: 

The first step for cross compiling is to make sure all the environment variables for the Yocto SDK are set!

    Open a terminal. Set the environment. This step is mandatory. Omitting this step will cause building with the host systems compiler instead of cross compiling.
    $source /<path to the Yocto SDK installation>/environment-setup-<platform specific suffix e.g. aarch64-poky-linux> 
    
    
    Important! From the same console with the set environment start the CMake GUI or run the CMake commandline. We will continue with the CMake GUI in this guide. Point CMake to source directory
    • Folder containing top-level "CMakeLists.txt", e.g. \cmake\Candera\/cmake/Candera/Player
      drawing-4-1677567539.png

    Point CMake to binary directory
    • May not exist, create folder with CMake if necessary
    • Root directory for generated makefiles / solutions
    • Root directory for build artifacts
      drawing-4-1677567561.png

    Configure
    • Specify Unix Makefiles”Makefiles as generator for the projectproject.
    • Specify tool-chain file for cross-compilingcompiling.
      drawing-4-1677567581.png

    Select the toolchain-file from the delivery (adapt for your toolchain installation and application specific needs)

        /cgi_studio_devices/src/Wayland/ToolchainFiles/GCC-toolchain-Wayland-Linux.txt


        OpenGL ES 2.0 and 3.0 versions are supported please configure CMake variable "CGIDEVICE_GLES_VERSION"


        Adapt the CMake settingssettings, if necessary, e.g.:
        • CMAKE_BUILD_TYPE-> Debug or ReleaseRelease.
        Enable/disable features. Press Configure. Press Generate.

        Building Application

        useMake samesure Terminalthat sessionthe environment variables for allthe steps.Yocto SDK are set in the terminal! Either reuse the terminal used to start CMake for building the Player or call the environment setup script again.

        $source 
        /<path
          Initializeto the cross-compileYocto environmentSDK variables first have to be set with following command
          . /<path-to-yocto-installation>/environment-setup-...<platform specific suffix e.g. aarch64-poky-linux> 
          
          

          1. Open CMake GUI and configure the project (e.g Player, CourierSampleApp, CitDemoApp) according to Generate Makefiles with CMake.
          2. After generating your cmake files, simply navigate to the specified build directory (binary directory created in CMake GUI) and type "make" within terminal to start the build process.or “make -j” to build with multithreading.
            With some hypervisors, the Linux VM may get unresponsive when using the –j option. Reducing the number of used threads to the number of available cores improves the responsiveness of the VM during the build.

          For CourierSampleApp and CitDemoApp asset file have tomust be created with theira ownmatching SCHost.dll as the SCHost.dll for the CourierSampleApp and CitDemoApp contain specialized Widgets.