summaryrefslogtreecommitdiffstats
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-10-14 14:41:34 +0200
commitbfa856f8a90ed794712868bb7303eb620f7a70c5 (patch)
tree2773096004281245fc22592cebac2f4ed57218df
parent4ac1b8fae502420e9d5659ab079a49100b5cc7cf (diff)
downloadtqt3-bfa856f8.tar.gz
tqt3-bfa856f8.zip
Use the tqInstallPath* functions for all paths needed for the pkg-config file.r14.0.11
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit e0d2f1e04906bee328fa71bf4eb98b9ec1904c19)
-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 07813d61..75211e47 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);
TQTextStream t(&ft);
- TQString prefix = pkgConfigPrefix();
- TQString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR");
- if(libDir.isEmpty())
- libDir = prefix + "/lib";
- TQString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR");
- if(includeDir.isEmpty())
- includeDir = prefix + "/include";
- TQString pluginsDir = project->first("QMAKE_PKGCONFIG_PLUGINS");
- if(pluginsDir.isEmpty())
- pluginsDir = prefix + "/plugins";
- TQString translationsDir = tqInstallPathTranslations();
- 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
+ TQString prefix = pkgConfigPrefix();
+ TQString libDir = tqInstallPathLibs();
+ if (libDir.isEmpty())
+ {
+ libDir = prefix + "/lib";
+ }
+ TQString includeDir = tqInstallPathHeaders();
+ if (includeDir.isEmpty())
+ {
+ includeDir = prefix + "/include";
+ }
+ TQString pluginsDir = tqInstallPathPlugins();
+ if (pluginsDir.isEmpty())
+ {
+ pluginsDir = prefix + "/plugins";
+ }
+ TQString translationsDir = tqInstallPathTranslations();
+ 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;