Use the tqInstallPath* functions for all paths needed for the pkg-config file.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/55/head
Slávek Banko 3 years ago
parent cf770e66e5
commit e0d2f1e049
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1546,26 +1546,38 @@ UnixMakefileGenerator::writePkgConfigFile() // ### does make sense only for
project->variables()["ALL_DEPS"].append(fname); project->variables()["ALL_DEPS"].append(fname);
TQTextStream t(&ft); TQTextStream t(&ft);
TQString prefix = pkgConfigPrefix(); TQString prefix = pkgConfigPrefix();
TQString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR"); TQString libDir = tqInstallPathLibs();
if(libDir.isEmpty()) if (libDir.isEmpty())
libDir = prefix + "/lib"; {
TQString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR"); libDir = prefix + "/lib";
if(includeDir.isEmpty()) }
includeDir = prefix + "/include"; TQString includeDir = tqInstallPathHeaders();
TQString pluginsDir = project->first("QMAKE_PKGCONFIG_PLUGINS"); if (includeDir.isEmpty())
if(pluginsDir.isEmpty()) {
pluginsDir = prefix + "/plugins"; includeDir = prefix + "/include";
TQString translationsDir = tqInstallPathTranslations(); }
if(translationsDir.isEmpty()) TQString pluginsDir = tqInstallPathPlugins();
translationsDir = prefix + "/translations"; if (pluginsDir.isEmpty())
{
t << "prefix=" << prefix << endl; pluginsDir = prefix + "/plugins";
t << "exec_prefix=${prefix}\n" }
<< "libdir=" << pkgConfigFixPath(libDir) << "\n" TQString translationsDir = tqInstallPathTranslations();
<< "includedir=" << pkgConfigFixPath(includeDir) << "\n" if (translationsDir.isEmpty())
<< "translationsdir=" << pkgConfigFixPath(translationsDir) << endl; {
t << "pluginsdir=" << pkgConfigFixPath(pluginsDir) << endl; // non-standard entry. Provides path for plugins 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 // non-standard entry. Provides useful info normally only
// contained in the internal .qmake.cache file // contained in the internal .qmake.cache file
t << varGlue("CONFIG", "qt_config=", " ", "") << endl << endl; t << varGlue("CONFIG", "qt_config=", " ", "") << endl << endl;

Loading…
Cancel
Save