qtqmakeqtcore

Qt: *.pro vs *.pri


What is the difference between *.pro and *.pri configuration files for qmake?

What should go into a *.pro file and what should go into a *.pri file?


Solution

  • A .pro file is what you would run QMake on. A .pri file is included by a .pro file. Other than that there is not much of a difference between the two.

    Example usage could be if you have different builds which need different options. You could put shared information in the .pro, while deferring the options to various .pri files. A bit more information, although admittedly not much more, can be found here.