Menu

Home

Alexey V. Vasilyev

Cross-platform Build System for Qt solution. (Qt-CrossBuild)

Provides:

  1. Automatic build for win32-g++, win32-msvc2010, linux-g++ platforms.
  2. Easy library reference like .NET project.
  3. Easy external library reference with version restriction for MinGW and MSVC2010 platform.
  4. Unified Postbuild and Prebuild actions.

Requirements:

  1. For Win32: Defined PRODUCT_PLATFORM variable for Qt build stack.
  2. For Win32: Defined VS100COMNTOOLS variable.
  3. Installed unxutils for Win32
  4. Patched QMake for Qt/MSVC2010

Main formula

GNU Make + QMAKE + GNU Make

  1. Make begins build.
  2. QMake transforms .pro files
  3. Make provides post-build pre-build steps.

How to using:

  1. Prepare build environment.
    1.1. Create Qt build stack (see below)
    1.2. Define PRODUCT_PLATFORM environment variable to Qt build stack root.
    1.3. Install MSVS 2010.
    1.4. Verify VS100COMNTOOLS environment varibale.

  2. Use in your projects:

2.1. Copy <scripts></scripts> directory into your solution root as <root>/scripts</root>
(or link via VCS externals feature from your own reposiory)

2.2. Extract SUBDIRS variable from your <solution>.pro to <root>/projects.pri</root> for
using in solution Makefile.</solution>

2.3. Copy sample solution Makefile to solution root as <root>/Makefile</root>
or <root>/product.mak</root> if this file placed in same place with <solution>.pro.</solution>

2.4. Create <root>/version.ini</root> file with version of our solution.

2.5. Update <root>/Makefile</root> by your own rules.

2.6. Update all .pro files for all projects in solution for using <root>/scripts/common.pri</root>
(see Demo projects for details)

  1. Try how it works.

Qt build stack.

Qt build stack required only for Windows platform because
under linux all packages must be installed into system.

Qt build stack must contain:

  • Qt versions for all target platforms,
  • MinGW toolchain
  • Unix utilities for Windows as comlete helper.

QT build stack must contains next directory structure:

<prefix>/mingw</prefix> - MinGW toolchain
<prefix>/python</prefix> - Python script engine for Win32
<prefix>/qt/mingw</prefix> - Qt compiled for MinGW toolchain
<prefix>/qt/msvc</prefix> - Qt compiled for MSVC2010 toolchain
<prefix>/unxutils</prefix> - complete UnxUtils package (http://unxutils.sourceforge.net/)

Next packages must be installed into system for linux build:

  • Qt devel
  • python
  • binutils
  • g++ toolchain

Project Admins:


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.