diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-02-04 12:27:34 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-06 14:21:44 +0100 |
commit | 5a0ec1b0f3f25748e9c969ccacff6b143a1d6f9d (patch) | |
tree | a537a820844dc62a0935753a304ee60624c7cda9 /qmake/generators/makefile.cpp | |
parent | dcada2a05d867dc83f579067168c813a20f2aa92 (diff) | |
download | qtbase-5a0ec1b0f3f25748e9c969ccacff6b143a1d6f9d.tar.gz |
add ability to override the generated pkg-config file name
introduce the QMAKE_PKGCONFIG_FILE variable for that purpose.
this is another feature that is needed for a bugfix ...
Change-Id: I08f470e1b2b7dd318af9195330c15d813fcd55ef
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r-- | qmake/generators/makefile.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 444556d467..b001fd930b 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -3110,15 +3110,18 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const QString MakefileGenerator::pkgConfigFileName(bool fixify) { - QString ret = var("TARGET"); - int slsh = ret.lastIndexOf(Option::dir_sep); - if(slsh != -1) - ret = ret.right(ret.length() - slsh - 1); - if(ret.startsWith("lib")) - ret = ret.mid(3); - int dot = ret.indexOf('.'); - if(dot != -1) - ret = ret.left(dot); + QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString(); + if (ret.isEmpty()) { + ret = project->first("TARGET").toQString(); + int slsh = ret.lastIndexOf(Option::dir_sep); + if (slsh != -1) + ret = ret.right(ret.length() - slsh - 1); + if (ret.startsWith("lib")) + ret = ret.mid(3); + int dot = ret.indexOf('.'); + if (dot != -1) + ret = ret.left(dot); + } ret += Option::pkgcfg_ext; QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString(); if(!subdir.isEmpty()) { |