Search code examples
qtmakefileqmake

Qt pro file call another makefile


Is there a way to use the .pro file in Qt to call another Makefile? For example, in a makefile, you could use:

make -f /other/path/Makefile

Is there anything like using the pro file for Qt?


Solution

  • Something like this should work:

    QMAKE_EXTRA_TARGETS += other
    PRE_TARGETDEPS += other
    other.commands = make -f /other/path/Makefile
    

    this will cause make -f /other/path/Makefile to be called as part of the make process, and will also give you the ability to type make other to just run that command.