From d5a16e4a3c02bd273e1d7329eb02e3e7f60c0b7f Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Tue, 22 Oct 2013 06:28:27 +0300 Subject: Add QMAKE_PKGCONFIG_VERSION variable to allow version overriding Change-Id: Ibba50c74f308d81e0058e4dacec7ed84e738473e Reviewed-by: Oswald Buddenhagen --- qmake/generators/makefile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f567b6c694..3093c834cc 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: "; -- cgit v1.2.3