qmake: improve the .pc files generator
authorKonstantin Ritt <ritt.ks@gmail.com>
Sat, 30 Jun 2012 06:05:13 +0000 (09:05 +0300)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Jul 2012 23:08:44 +0000 (01:08 +0200)
Don't hardcode the "qt_config" EXTRA variable and use QMAKE_PKGCONFIG_VARIABLES instead.
This allows qmake create the .pc files that are unrelated to Qt.

Change-Id: Ic72005e8819a15f6c50f3aaf79424a247fba20af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
mkspecs/features/qt_module_config.prf
qmake/generators/makefile.cpp

index 2046fc5..57d8b5d 100644 (file)
@@ -227,6 +227,11 @@ DEFINES *= QT_DEPRECATED_WARNINGS
 
 TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
 
+# Provides useful info normally only contained in the internal .qmake.cache file
+qt_conf.name = qt_config
+qt_conf.variable = CONFIG
+QMAKE_PKGCONFIG_VARIABLES += qt_conf
+
 load(qt_targets)
 
 win32:DEFINES+=_USE_MATH_DEFINES
index c4e0a4f..abd6d32 100644 (file)
@@ -3201,9 +3201,7 @@ MakefileGenerator::writePkgConfigFile()
     t << "exec_prefix=${prefix}\n"
       << "libdir=" << pkgConfigFixPath(libDir) << "\n"
       << "includedir=" << pkgConfigFixPath(includeDir) << endl;
-    // non-standard entry. Provides useful info normally only
-    // contained in the internal .qmake.cache file
-    t << varGlue("CONFIG", "qt_config=", " ", "") << endl;
+    t << endl;
 
     //extra PKGCONFIG variables
     const QStringList &pkgconfig_vars = project->values("QMAKE_PKGCONFIG_VARIABLES");