From commit a2d184bb it is not necessary to pass -DKDE_INSTALL_USE_QT_SYS_PATHS=ON explicitely if the install prefix coincides with the Qt one, since it is set automatically in KDEInstallDirs. This variable is used in ECMGeneratePriFile to determine the mkspecs path. If a project includes ECMGeneratePriFile before KDEInstallDirs (eg. like kdepim-apps-libs or kmailtransport do) then the variable will still not be set when importing ECMGeneratePriFile and the pri files will be installed in the wrong path. Not sure if this should be fixed in ECM (by including KDEInstallDirs in ECMGeneratePriFile) or in the projects by making sure that KDEInstallDirs is included befora ECMGeneratePriFile. Reproducible: Always