Important: Please read the Qt Code of Conduct -

Prevent multiple calling of QMake and build scope

  • Hello,

    I want to configure my project to call some batch file only in case I set the build of project as "Release" (I shown below) but I noticed that Qt Creator calls QMake three times.

    How can I make Qt Creator call QMake only one time?

    Even if I select Qt Creator to build my project in "Debug" mode Qt Creator calls the batch file although I set the condition to be run just under release mode!

    How can I make Qt Creator call batch file only in "Release" mode?

    [code]QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = BuildUsingQmake
    TEMPLATE = app

    SOURCES += main.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    CONFIG(release, debug|release) {
    system('create-distro.bat "$$QT_PATH" "$$PG_PATH"')

    P.S. I'm using:

    • Qt Creator 3.1.2 (opensource)
    • Qt 5.3.1 (opensource)

  • May I get some help guys?

Log in to reply