diff options
| author | Valerio Valerio <valerio.valerio@jollamobile.com> | 2013-04-22 09:32:02 +0300 |
|---|---|---|
| committer | Valerio Valerio <valerio.valerio@jollamobile.com> | 2013-04-26 10:37:41 +0200 |
| commit | e116de6a0d4ccb58435105d2f7ecf5ea80c9541b (patch) | |
| tree | e2aa42f89b7136f3e86a1ff1dce91a5c8459dbfd | |
| parent | a5d645d6a7ca026c5e43c54b24891a4b8947e2a5 (diff) | |
Allow parallel installation of qt4 and qt5 builds
Signed-off-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Change-Id: I2c03d287fc871098cf45d75d4a1262b9c6c4378d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
19 files changed, 110 insertions, 53 deletions
diff --git a/benchmarks/tst_messageserver/tst_messageserver.pro b/benchmarks/tst_messageserver/tst_messageserver.pro index f6388e97..62774447 100644 --- a/benchmarks/tst_messageserver/tst_messageserver.pro +++ b/benchmarks/tst_messageserver/tst_messageserver.pro @@ -1,12 +1,14 @@ TEMPLATE = app CONFIG += unittest CONFIG += qmfmessageserver qmfclient - QT += testlib -equals(QT_MAJOR_VERSION, 5): QT += widgets +TARGET = tst_messageserver -TARGET = tst_messageserver -target.path += $$QMF_INSTALL_ROOT/tests +equals(QT_MAJOR_VERSION, 4): target.path += $$QMF_INSTALL_ROOT/tests +equals(QT_MAJOR_VERSION, 5){ + target.path += $$QMF_INSTALL_ROOT/tests5 + QT += widgets +} BASE=../../ include($$BASE/common.pri) @@ -32,7 +34,8 @@ INCLUDEPATH += . 3rdparty $$BASE/src/libraries/qmfclient \ LIBS += -L$$BASE/src/libraries/qmfmessageserver/build \ -L$$BASE/src/libraries/qmfclient/build -LIBS += -lqmfmessageserver -lqmfclient +equals(QT_MAJOR_VERSION, 4): LIBS += -lqmfmessageserver -lqmfclient +equals(QT_MAJOR_VERSION, 5): LIBS += -lqmfmessageserver5 -lqmfclient5 QMAKE_LFLAGS += -Wl,-rpath,$$BASE/src/libraries/qmfclient \ -Wl,-rpath,$$BASE/src/libraries/qmfmessageserver diff --git a/examples/messagingaccounts/messagingaccounts.pro b/examples/messagingaccounts/messagingaccounts.pro index 9b73dfcb..09de123f 100644 --- a/examples/messagingaccounts/messagingaccounts.pro +++ b/examples/messagingaccounts/messagingaccounts.pro @@ -1,9 +1,16 @@ TEMPLATE = app -TARGET = messagingaccounts target.path += $$QMF_INSTALL_ROOT/bin CONFIG += qmfclient qmfmessageserver -equals(QT_MAJOR_VERSION, 5): QT += widgets +equals(QT_MAJOR_VERSION, 4){ + TARGET = messagingaccounts + LIBS += -lqmfmessageserver -lqmfclient +} +equals(QT_MAJOR_VERSION, 5){ + TARGET = messagingaccounts5 + QT += widgets + LIBS += -lqmfmessageserver5 -lqmfclient5 +} DEPENDPATH += . @@ -24,8 +31,6 @@ LIBS += -L../../src/libraries/qmfclient/build \ macx:LIBS += -F../../src/libraries/qmfclient/build \ -F../../src/libraries/qmfmessageserver/build -LIBS += -lqmfmessageserver -lqmfclient - HEADERS += $$QTMAIL_EXAMPLE/app/accountsettings.h \ $$QTMAIL_EXAMPLE/app/editaccount.h \ $$QTMAIL_EXAMPLE/app/statusbar.h \ diff --git a/examples/qtmail/app/app.pro b/examples/qtmail/app/app.pro index a9db0caa..b81d9e2a 100644 --- a/examples/qtmail/app/app.pro +++ b/examples/qtmail/app/app.pro @@ -1,10 +1,18 @@ TEMPLATE = app -TARGET = qtmail + +equals(QT_MAJOR_VERSION, 4){ + TARGET = qtmail + LIBS += -lqmfmessageserver -lqmfclient -lqmfutil +} +equals(QT_MAJOR_VERSION, 5){ + TARGET = qtmail5 + QT += widgets + LIBS += -lqmfmessageserver5 -lqmfclient5 -lqmfutil5 +} + CONFIG += qmfutil qmfclient qmfmessageserver target.path += $$QMF_INSTALL_ROOT/bin -equals(QT_MAJOR_VERSION, 5): QT += widgets - DEPENDPATH += . INCLUDEPATH += . ../../../src/libraries/qmfclient \ @@ -20,8 +28,6 @@ macx:LIBS += -F../../../src/libraries/qmfclient/build \ -F../libs/qmfutil/build \ -F../../../src/libraries/qmfmessageserver/build -LIBS += -lqmfmessageserver -lqmfclient -lqmfutil - HEADERS += emailclient.h \ messagelistview.h \ searchview.h \ diff --git a/examples/qtmail/libs/qmfutil/qmfutil.pro b/examples/qtmail/libs/qmfutil/qmfutil.pro index 1d1d5cf1..02d286f4 100644 --- a/examples/qtmail/libs/qmfutil/qmfutil.pro +++ b/examples/qtmail/libs/qmfutil/qmfutil.pro @@ -1,14 +1,15 @@ TEMPLATE = lib CONFIG += warn_on CONFIG += qmfclient -TARGET = qmfutil - +equals(QT_MAJOR_VERSION, 4): TARGET = qmfutil +equals(QT_MAJOR_VERSION, 5){ + TARGET = qmfutil5 + QT += widgets +} target.path += $$QMF_INSTALL_ROOT/lib DEFINES += QMFUTIL_INTERNAL -equals(QT_MAJOR_VERSION, 5): QT += widgets - DEPENDPATH += . INCLUDEPATH += . ../../../../src/libraries/qmfclient ../../../../src/libraries/qmfclient/support diff --git a/examples/qtmail/plugins/composers/email/email.pro b/examples/qtmail/plugins/composers/email/email.pro index 4b8ef1a7..e3c0513d 100644 --- a/examples/qtmail/plugins/composers/email/email.pro +++ b/examples/qtmail/plugins/composers/email/email.pro @@ -2,9 +2,11 @@ TEMPLATE = lib TARGET = emailcomposer CONFIG += qmfclient qmfutil plugin -equals(QT_MAJOR_VERSION, 5): QT += widgets - -target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/composers +equals(QT_MAJOR_VERSION, 4): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/composers +equals(QT_MAJOR_VERSION, 5) { + target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/composers + QT += widgets +} DEFINES += PLUGIN_INTERNAL diff --git a/examples/qtmail/plugins/viewers/generic/generic.pro b/examples/qtmail/plugins/viewers/generic/generic.pro index d020b49d..42f2bcec 100644 --- a/examples/qtmail/plugins/viewers/generic/generic.pro +++ b/examples/qtmail/plugins/viewers/generic/generic.pro @@ -2,9 +2,11 @@ TEMPLATE = lib TARGET = genericviewer CONFIG += qmfclient qmfutil plugin -equals(QT_MAJOR_VERSION, 5): QT += widgets - -target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/viewers +equals(QT_MAJOR_VERSION, 4): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/viewers +equals(QT_MAJOR_VERSION, 5){ + target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/viewers + QT += widgets +} # Use webkit to render mail if available contains(QT_CONFIG,webkit){ diff --git a/examples/serverobserver/serverobserver.pro b/examples/serverobserver/serverobserver.pro index b1aa74ac..32d47ea1 100644 --- a/examples/serverobserver/serverobserver.pro +++ b/examples/serverobserver/serverobserver.pro @@ -1,10 +1,18 @@ TEMPLATE = app -TARGET = serverobserver + +equals(QT_MAJOR_VERSION, 4){ + TARGET = serverobserver + LIBS += -lqmfmessageserver -lqmfclient +} +equals(QT_MAJOR_VERSION, 5){ + TARGET = serverobserver5 + QT += widgets + LIBS += -lqmfmessageserver5 -lqmfclient5 +} + target.path += $$QMF_INSTALL_ROOT/bin CONFIG += qmfclient qmfmessageserver -equals(QT_MAJOR_VERSION, 5): QT += widgets - DEPENDPATH += . INCLUDEPATH += . ../../src/libraries/qmfclient \ ../../src/libraries/qmfclient/support \ @@ -16,8 +24,6 @@ LIBS += -L../../src/libraries/qmfclient/build \ macx:LIBS += -F../../src/libraries/qmfclient/build \ -F../../src/libraries/qmfmessageserver/build -LIBS += -lqmfmessageserver -lqmfclient - HEADERS += serverobserver.h SOURCES += serverobserver.cpp \ diff --git a/src/libraries/qmfclient/qmfclient.pro b/src/libraries/qmfclient/qmfclient.pro index e7b57587..39c34bb3 100644 --- a/src/libraries/qmfclient/qmfclient.pro +++ b/src/libraries/qmfclient/qmfclient.pro @@ -1,6 +1,7 @@ TEMPLATE = lib CONFIG += warn_on -TARGET = qmfclient +equals(QT_MAJOR_VERSION, 4): TARGET = qmfclient +equals(QT_MAJOR_VERSION, 5): TARGET = qmfclient5 INSTALLS += target CONFIG += link_pkgconfig @@ -170,7 +171,8 @@ TRANSLATIONS += libqtopiamail-ar.ts \ libqtopiamail-zh_CN.ts \ libqtopiamail-zh_TW.ts -header_files.path=$$QMF_INSTALL_ROOT/include/qmfclient +equals(QT_MAJOR_VERSION, 4): header_files.path=$$QMF_INSTALL_ROOT/include/qmfclient +equals(QT_MAJOR_VERSION, 5): header_files.path=$$QMF_INSTALL_ROOT/include/qmfclient5 header_files.files=$$PUBLIC_HEADERS INSTALLS += header_files diff --git a/src/libraries/qmfclient/support/qmailnamespace.cpp b/src/libraries/qmfclient/support/qmailnamespace.cpp index 0811d4da..b08dc573 100644 --- a/src/libraries/qmfclient/support/qmailnamespace.cpp +++ b/src/libraries/qmfclient/support/qmailnamespace.cpp @@ -272,7 +272,11 @@ QString QMail::pluginsPath() // default to QMF_INSTALL_ROOT/lib/qmf/plugins, as that's where it will most // likely be. we also search the old fallback (".") via QCoreApplication, // still. +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + return QString::fromUtf8(QMF_INSTALL_ROOT) + "/lib/qmf/plugins5/"; +#else return QString::fromUtf8(QMF_INSTALL_ROOT) + "/lib/qmf/plugins/"; +#endif } /*! diff --git a/src/libraries/qmfmessageserver/qmfmessageserver.pro b/src/libraries/qmfmessageserver/qmfmessageserver.pro index 9e4cbe48..ccfcb508 100644 --- a/src/libraries/qmfmessageserver/qmfmessageserver.pro +++ b/src/libraries/qmfmessageserver/qmfmessageserver.pro @@ -1,8 +1,15 @@ TEMPLATE = lib CONFIG += warn_on CONFIG += qmfclient -TARGET = qmfmessageserver +equals(QT_MAJOR_VERSION, 4){ + TARGET = qmfmessageserver + LIBS += -lqmfclient +} +equals(QT_MAJOR_VERSION, 5){ + TARGET = qmfmessageserver5 + LIBS += -lqmfclient5 +} target.path += $$QMF_INSTALL_ROOT/lib QT = core network @@ -21,8 +28,6 @@ INCLUDEPATH += . ../qmfclient ../qmfclient/support LIBS += -L../qmfclient/build macx:LIBS += -F../qmfclient/build -LIBS += -lqmfclient - PUBLIC_HEADERS += qmailauthenticator.h \ qmailmessagebuffer.h \ qmailmessageclassifier.h \ @@ -43,7 +48,8 @@ SOURCES += qmailauthenticator.cpp \ qmailtransport.cpp \ qmailheartbeattimer_qtimer.cpp # NB: There are multiple implementations -header_files.path=$$QMF_INSTALL_ROOT/include/qmfmessageserver +equals(QT_MAJOR_VERSION, 4): header_files.path=$$QMF_INSTALL_ROOT/include/qmfmessageserver +equals(QT_MAJOR_VERSION, 5): header_files.path=$$QMF_INSTALL_ROOT/include/qmfmessageserver5 header_files.files=$$PUBLIC_HEADERS INSTALLS += header_files diff --git a/src/plugins/contentmanagers/qmfstoragemanager/qmfstoragemanager.pro b/src/plugins/contentmanagers/qmfstoragemanager/qmfstoragemanager.pro index cc889c9b..457850a9 100644 --- a/src/plugins/contentmanagers/qmfstoragemanager/qmfstoragemanager.pro +++ b/src/plugins/contentmanagers/qmfstoragemanager/qmfstoragemanager.pro @@ -3,7 +3,8 @@ TARGET = qmfstoragemanager CONFIG += qmfclient plugin QT = core -target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/contentmanagers +equals(QT_MAJOR_VERSION, 4): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/contentmanagers +equals(QT_MAJOR_VERSION, 5): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/contentmanagers DEFINES += PLUGIN_INTERNAL diff --git a/src/plugins/messageservices/imap/imap.pro b/src/plugins/messageservices/imap/imap.pro index fab4ea2b..959a6bb5 100644 --- a/src/plugins/messageservices/imap/imap.pro +++ b/src/plugins/messageservices/imap/imap.pro @@ -1,8 +1,9 @@ -TEMPLATE = lib -TARGET = imap +TEMPLATE = lib +TARGET = imap CONFIG += qmfmessageserver qmfclient plugin -target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 4): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 5): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices QT = core network diff --git a/src/plugins/messageservices/pop/pop.pro b/src/plugins/messageservices/pop/pop.pro index 44ac2100..a3dfe9c4 100644 --- a/src/plugins/messageservices/pop/pop.pro +++ b/src/plugins/messageservices/pop/pop.pro @@ -1,8 +1,9 @@ -TEMPLATE = lib -TARGET = pop +TEMPLATE = lib +TARGET = pop CONFIG += qmfclient qmfmessageserver plugin -target.path = $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 4): target.path = $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 5): target.path = $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices QT = core network diff --git a/src/plugins/messageservices/qmfsettings/qmfsettings.pro b/src/plugins/messageservices/qmfsettings/qmfsettings.pro index e040eca9..6e614f36 100644 --- a/src/plugins/messageservices/qmfsettings/qmfsettings.pro +++ b/src/plugins/messageservices/qmfsettings/qmfsettings.pro @@ -1,8 +1,9 @@ -TEMPLATE = lib +TEMPLATE = lib TARGET = qmfsettings CONFIG += qmfclient qmfmessageserver plugin -target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 4): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 5): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices QT = core network diff --git a/src/plugins/messageservices/smtp/smtp.pro b/src/plugins/messageservices/smtp/smtp.pro index 48e120f9..c0330ea2 100644 --- a/src/plugins/messageservices/smtp/smtp.pro +++ b/src/plugins/messageservices/smtp/smtp.pro @@ -2,8 +2,8 @@ TEMPLATE = lib TARGET = smtp CONFIG += qmfclient qmfmessageserver plugin - -target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 4): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins/messageservices +equals(QT_MAJOR_VERSION, 5): target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/messageservices QT = core network DEPENDPATH += . diff --git a/src/tools/messageserver/messageserver.pro b/src/tools/messageserver/messageserver.pro index 9aeecd74..fcfe535a 100644 --- a/src/tools/messageserver/messageserver.pro +++ b/src/tools/messageserver/messageserver.pro @@ -5,7 +5,16 @@ SERVER_AS_DLL: { } else { TEMPLATE = app } -TARGET = messageserver + +equals(QT_MAJOR_VERSION, 4){ + TARGET = messageserver + LIBS += -lqmfmessageserver -lqmfclient +} +equals(QT_MAJOR_VERSION, 5){ + TARGET = messageserver5 + LIBS += -lqmfmessageserver5 -lqmfclient5 +} + CONFIG += qmfmessageserver qmfclient QT = core @@ -27,8 +36,6 @@ LIBS += -L../../libraries/qmfmessageserver/build \ macx:LIBS += -F../../libraries/qmfmessageserver/build \ -F../../libraries/qmfclient/build -LIBS += -lqmfmessageserver -lqmfclient - HEADERS += mailmessageclient.h \ messageserver.h \ servicehandler.h \ diff --git a/tests/tests.pri b/tests/tests.pri index e87fccea..a3a4ec42 100644 --- a/tests/tests.pri +++ b/tests/tests.pri @@ -6,13 +6,19 @@ macx { QMAKE_MACOSX_DEPLOYMENT_TARGET=10.5 } -target.path+=$$QMF_INSTALL_ROOT/tests +equals(QT_MAJOR_VERSION, 4){ + LIBS += -lqmfclient + target.path += $$QMF_INSTALL_ROOT/tests +} +equals(QT_MAJOR_VERSION, 5){ + LIBS += -lqmfclient5 + target.path += $$QMF_INSTALL_ROOT/tests5 +} QMFPATH=../../src/libraries/qmfclient DEPENDPATH += . INCLUDEPATH += . $$QMFPATH $$QMFPATH/support LIBS += -L$$QMFPATH/build -LIBS += -lqmfclient macx:LIBS += -F$$QMFPATH/build QMAKE_LFLAGS += -Wl,-rpath,$$QMFPATH diff --git a/tests/tests.pro b/tests/tests.pro index 24e9e4bc..20ec970a 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -32,6 +32,7 @@ CONFIG += unittest # Install test file description test_description.files = tests.xml -test_description.path = $$QMF_INSTALL_ROOT/tests +equals(QT_MAJOR_VERSION, 4): test_description.path = $$QMF_INSTALL_ROOT/tests +equals(QT_MAJOR_VERSION, 5): test_description.path = $$QMF_INSTALL_ROOT/tests5 INSTALLS += test_description diff --git a/tests/tst_python_email/tst_python_email.pro b/tests/tst_python_email/tst_python_email.pro index 457cab94..428d49ea 100644 --- a/tests/tst_python_email/tst_python_email.pro +++ b/tests/tst_python_email/tst_python_email.pro @@ -4,7 +4,9 @@ TARGET = tst_python_email DEFINES += SRCDIR=\\\"$$_PRO_FILE_PWD_\\\" -testdata.path = $$QMF_INSTALL_ROOT/tests/testdata +equals(QT_MAJOR_VERSION, 4): testdata.path = $$QMF_INSTALL_ROOT/tests/testdata +equals(QT_MAJOR_VERSION, 5): testdata.path = $$QMF_INSTALL_ROOT/tests5/testdata + testdata.files = testdata/* INSTALLS += testdata |
