diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f567b6c6942..3093c834cc9 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -3270,7 +3270,11 @@ MakefileGenerator::writePkgConfigFile() } } t << "Description: " << desc << endl; - t << "Version: " << project->first("VERSION") << endl; + ProString version = project->first("QMAKE_PKGCONFIG_VERSION"); + if (version.isEmpty()) + version = project->first("VERSION"); + if (!version.isEmpty()) + t << "Version: " << version << endl; // libs t << "Libs: ";