summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-10-12 20:50:23 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-12-30 17:31:35 +0100
commit628d5bf7addc44ff72a0a58f6fd6207a6e4df400 (patch)
tree8d34b4c1264987e19481c5211d1060098ca7bf1d /qmake/generators
parent73a90d568d68aa49c7dd1a51dcafb729efd4f44e (diff)
downloadqt3-628d5bf7addc44ff72a0a58f6fd6207a6e4df400.tar.gz
qt3-628d5bf7addc44ff72a0a58f6fd6207a6e4df400.zip
Use the tqInstallPath* functions for all paths needed for the pkg-config file.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 38048ca6154899a74c5c7e7ebcabd37373266220)
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/unix/unixmake2.cpp52
1 files changed, 32 insertions, 20 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 4069b14..e583419 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1546,26 +1546,38 @@ UnixMakefileGenerator::writePkgConfigFile() // ### does make sense only for
project->variables()["ALL_DEPS"].append(fname);
QTextStream t(&ft);
- QString prefix = pkgConfigPrefix();
- QString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR");
- if(libDir.isEmpty())
- libDir = prefix + "/lib";
- QString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR");
- if(includeDir.isEmpty())
- includeDir = prefix + "/include";
- QString pluginsDir = project->first("QMAKE_PKGCONFIG_PLUGINS");
- if(pluginsDir.isEmpty())
- pluginsDir = prefix + "/plugins";
- QString translationsDir = qInstallPathTranslations();
- if(translationsDir.isEmpty())
- translationsDir = prefix + "/translations";
-
- t << "prefix=" << prefix << endl;
- t << "exec_prefix=${prefix}\n"
- << "libdir=" << pkgConfigFixPath(libDir) << "\n"
- << "includedir=" << pkgConfigFixPath(includeDir) << "\n"
- << "translationsdir=" << pkgConfigFixPath(translationsDir) << endl;
- t << "pluginsdir=" << pkgConfigFixPath(pluginsDir) << endl; // non-standard entry. Provides path for plugins
+ QString prefix = pkgConfigPrefix();
+ QString libDir = qInstallPathLibs();
+ if (libDir.isEmpty())
+ {
+ libDir = prefix + "/lib";
+ }
+ QString includeDir = qInstallPathHeaders();
+ if (includeDir.isEmpty())
+ {
+ includeDir = prefix + "/include";
+ }
+ QString pluginsDir = qInstallPathPlugins();
+ if (pluginsDir.isEmpty())
+ {
+ pluginsDir = prefix + "/plugins";
+ }
+ QString translationsDir = qInstallPathTranslations();
+ if (translationsDir.isEmpty())
+ {
+ translationsDir = prefix + "/translations";
+ }
+
+ t << "prefix=" << prefix << endl
+ << "exec_prefix=${prefix}" << endl
+ << "libdir=" << pkgConfigFixPath(libDir) << endl
+ << "includedir=" << pkgConfigFixPath(includeDir) << endl
+ // non-standard entry. Provides path for plugins
+ << "pluginsdir=" << pkgConfigFixPath(pluginsDir) << endl
+ // non-standard entry. Provides path for translations
+ << "translationsdir=" << pkgConfigFixPath(translationsDir) << endl
+ << endl;
+
// non-standard entry. Provides useful info normally only
// contained in the internal .qmake.cache file
t << varGlue("CONFIG", "qt_config=", " ", "") << endl << endl;