Important: Please read the Qt Code of Conduct -

is using .qmake.cache file different from including a .pri file?

  • Hi,

    I am trying to move from including a .pri file in my .pro files of a larger scale project to using .qmake.cache.
    I want to use .qmake.cach, so I won't need to include the same .pri file in each of my sub projects .pro files - using a different relative path each time.

    Now I am facing the following problems:

    • it seems as if some QMAKE variables are not available when using the .qmake.cache file, while they are available using the .pri file (QT_MAJOR_VERSION,...)
    • scopes like unix{ ...} or win32 { } else { } are not evaluated correctly - qmake always uses the else branch instead of the platform specific.

    Does anybody know about this behavior?
    Is there documentation available on this topic?


  • Lifetime Qt Champion


    Did you follow that wiki article ?