blob: 6472869468f1893f7497f8ca15f52fa1609f9bde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
$NetBSD: patch-al,v 1.2 2007/10/24 15:50:18 joerg Exp $
--- qmake/generators/unix/unixmake2.cpp.orig 2005-09-02 12:43:19.000000000 +0000
+++ qmake/generators/unix/unixmake2.cpp
@@ -1206,6 +1206,9 @@ void UnixMakefileGenerator::init2()
project->variables()["TARGET"].first().prepend("lib");
project->variables()["TARGET"].first() += ".a";
if(project->variables()["QMAKE_AR_CMD"].isEmpty())
+ if( project->isActiveConfig("compile_libtool") )
+ project->variables()["QMAKE_AR_CMD"].append("$(CXX) -o $(TARGET) $(OBJECTS) $(OBJMOC)");
+ else
project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGET) $(OBJECTS) $(OBJMOC)");
} else {
project->variables()["TARGETA"].append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
@@ -1362,20 +1365,6 @@ void UnixMakefileGenerator::init2()
if(!project->isActiveConfig("compile_libtool"))
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"];
}
- QString destdir = project->first("DESTDIR");
- if ( !destdir.isEmpty() && !project->variables()["QMAKE_RPATH"].isEmpty() ) {
- QString rpath_destdir = destdir;
- if(QDir::isRelativePath(rpath_destdir)) {
- QFileInfo fi(Option::fixPathToLocalOS(rpath_destdir));
- if(fi.convertToAbs()) //strange, shouldn't really happen
- rpath_destdir = Option::fixPathToTargetOS(rpath_destdir, FALSE);
- else
- rpath_destdir = fi.filePath();
- } else {
- rpath_destdir = Option::fixPathToTargetOS(rpath_destdir, FALSE);
- }
- project->variables()["QMAKE_LFLAGS"] += project->first("QMAKE_RPATH") + rpath_destdir;
- }
}
QStringList &quc = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"];
for(QStringList::Iterator it = quc.begin(); it != quc.end(); ++it) {
@@ -1489,7 +1478,7 @@ UnixMakefileGenerator::pkgConfigFileName
QString ret = var("TARGET");
int slsh = ret.findRev(Option::dir_sep);
if(slsh != -1)
- ret = ret.right(ret.length() - slsh);
+ ret = ret.right(ret.length() - slsh - 1);
if(ret.startsWith("lib"))
ret = ret.mid(3);
int dot = ret.find('.');
|