Adding a Makefile to QMake process

  • Good morning,

    I have a quick question. Is there a way to add an external Makefile used by multiple applications (not just QT) to the .pro file of a project? This Makefile has definitions for common directories used for building. For example, SRCDIR = $(TOPDIR)/src. Some of these variables would be nice to use in the .pro file instead of redefining them in a .pri file. It should be noted you cannot invoke Make from this Makefile. It just stores common variables as mentioned above, which are then utilized in other Makefiles.


  • Moderators

    not the way you intend to use it.

    QMake is defined to be target independent and as a source to create target-dependant makefiles.
    Only you could execute a makefile execution., but not read the values in a .pro file.

  • @raven-worx Thanks for the reply. I had assumed as much. Technically the Makefile is not entirely a Makefile. It is actually more of a textfile. One solution could be to read in the textfile variables before the QMake process.

Log in to reply

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