summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2011-01-10 15:41:56 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-01-10 15:41:56 (GMT)
commitf18aca79a233c71f7a4bc72c9e31de948ba43c31 (patch)
tree22c4ccb9ff1025896f527d5939c21a7b26307649 /qmake
parent95646b07968604aa69f7e367dab7c9966dc44772 (diff)
downloadQt-f18aca79a233c71f7a4bc72c9e31de948ba43c31.zip
Qt-f18aca79a233c71f7a4bc72c9e31de948ba43c31.tar.gz
Qt-f18aca79a233c71f7a4bc72c9e31de948ba43c31.tar.bz2
qmake: write and install pkg-config files for mingw
Merge-request: 2543 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/mingw_make.cpp3
-rw-r--r--qmake/generators/win32/winmakefile.cpp12
2 files changed, 15 insertions, 0 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 4717542..2210bf7 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -142,6 +142,9 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
if(project->first("TEMPLATE") == "app" ||
project->first("TEMPLATE") == "lib") {
+ if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
+ writePkgConfigFile();
+
if(Option::mkfile::do_stub_makefile) {
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 8cf970e..b7974e8 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -809,6 +809,18 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) \"" + dst_prl + "\"");
}
+ if(project->isActiveConfig("create_pc")) {
+ QString dst_pc = pkgConfigFileName(false);
+ if (!dst_pc.isEmpty()) {
+ dst_pc = filePrefixRoot(root, targetdir + dst_pc);
+ if(!ret.isEmpty())
+ ret += "\n\t";
+ ret += "-$(INSTALL_FILE) \"" + pkgConfigFileName(true) + "\" \"" + dst_pc + "\"";
+ if(!uninst.isEmpty())
+ uninst.append("\n\t");
+ uninst.append("-$(DEL_FILE) \"" + dst_pc + "\"");
+ }
+ }
if(project->isActiveConfig("shared") && !project->isActiveConfig("plugin")) {
QString lib_target = getLibTarget();
lib_target.remove('"');