make install - qmake

  • I am seeing the instructions about how to install - build - compile and create the desired directories of a project.

    First of all, I have to build the project with the command "make" (in cmd) and then the command "make install" will create the directories (for example lib/ ...)

    If I start with the command "qmake", what is then the equivalent command for "make install"?

    Thanks in advance.

  • Lifetime Qt Champion


    qmake is used to prepare the build. The rest doesn't change.

  • Hi @Konstantinos,

    I like the way Wikipedia puts it:

    qmake is a utility that automates the generation of Makefiles. ... therefore qmake is a make-makefile tool, or makemake for short.

    In other words, qmake doesn't replace make - it complements it. Specifically, qmake generates Makefiles that you then use with the make and make install commands (or mingw32-make.exe or nmake.exe on Windows).

    @Konstantinos said:

    If I start with the command "qmake", what is then the equivalent command for "make install"?

    The command is still make install (or mingw32-make install or nmake install on Windows).

    So, since you appear to be using Windows, if you're using MinGW, you would do something like:

    qmake [path-to-dot-pro-file]
    mingw32-make check
    mingw32-make install

    Or if you're using MSVC:

    qmake [path-to-dot-pro-file]
    nmake check
    nmake install

    Personally, on Windows, I like to wrap mingw32-make.exe and nmake.exe each in their own make.cmd scripts, and export the path to the relevant script via a local target-platform setup script. That way I can just type make on all platforms :)


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.