Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cross compilation on commandline
Forum Updated to NodeBB v4.3 + New Features

Cross compilation on commandline

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 430 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AlexanderB
    wrote on last edited by
    #1

    Hi all,

    For my project I have a working setup in which I use Buildroot for cross compilation. I've added the needed kit and compilers to QT Creator. This all works as expected.

    But now I want to move the building of the project to a Jenkins based CI environment. This is a headless system, and I can't setup QT Creator as I did on my desktop.

    I've read several posts/questions about using mkspec files, but are still at a loss, since most are about building QT itself. Since Buildroot already builds QT for me, there is no problem there.

    Is there an easy way to adapt a QT Creator project with Cross Compile kit to something that works directly from the commandline using qmake?

    Many thanks!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AlexanderB
      wrote on last edited by
      #2

      To answer my own question... Simply running "Run qmake" from the creator and looking at the compile output gives enough information!

      All files are already in place, and I only need to use the correct qmake version and spec file created by Buildroot.

      // This creates the needed Makefile
      <buildroot-path>/output/host/usr/bin/qmake /path/to/project.pro -spec devices/linux-buildroot-g++ CONFIG+=debug CONFIG+=qml_debug
      
      // Which is needed to create all build files for the sub projects
      make qmake_all
      
      // After which the build can simply be run
      make -j
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        One thing to look out for: make -j will start a build for everything in your project. If it's a small one, that might not be a problem however if you have lots of files then you might starve your machine for resources.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved