diff options
author | Bernd Weimer <bweimer@blackberry.com> | 2014-07-09 11:58:44 +0200 |
---|---|---|
committer | Bernd Weimer <bweimer@blackberry.com> | 2014-07-28 14:08:22 +0200 |
commit | ec703836b314c419a1c463dc105234f733031535 (patch) | |
tree | 7009d63882089f0c1f6fd612563a4cb421e8c5a3 /tools | |
parent | 553325abfd988b062195caae280bbf75b8474ca4 (diff) |
Improve dbus cross compilation
Building QtDBus on Linux host for QNX target had two issues:
* Configure check failed, because dbus-1 library was not linked in,
if target platform doesn't support pkg-config.
* Host tools were not built, because pkg-config was not used to locate
dbus headers on the host.
Task-number: QTBUG-37324
Change-Id: I71d8309599fd40ef2dd8c9e3b44b93a7482019f1
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 14 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index b7565093f1..63d9f2804e 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1008,6 +1008,8 @@ void Configure::parseCmdLine() sybaseLibs = configCmdLine.at(i); } else if (configCmdLine.at(i).startsWith("DBUS_PATH=")) { dbusPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1)); + } else if (configCmdLine.at(i).startsWith("DBUS_HOST_PATH=")) { + dbusHostPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1)); } else if (configCmdLine.at(i).startsWith("MYSQL_PATH=")) { mysqlPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1)); } else if (configCmdLine.at(i).startsWith("ZLIB_LIBS=")) { @@ -2938,9 +2940,15 @@ void Configure::generateOutputVars() qmakeVars += QString("OPENSSL_LIBS += -L%1/lib").arg(opensslPath); } } - if (dictionary[ "DBUS" ] != "no" && !dbusPath.isEmpty()) { - qmakeVars += QString("QT_CFLAGS_DBUS = -I%1/include").arg(dbusPath); - qmakeVars += QString("QT_LIBS_DBUS = -L%1/lib").arg(dbusPath); + if (dictionary[ "DBUS" ] != "no") { + if (!dbusPath.isEmpty()) { + qmakeVars += QString("QT_CFLAGS_DBUS = -I%1/include").arg(dbusPath); + qmakeVars += QString("QT_LIBS_DBUS = -L%1/lib").arg(dbusPath); + if (dbusHostPath.isEmpty()) + qmakeVars += QString("QT_HOST_CFLAGS_DBUS = -I%1/include").arg(dbusPath); + } + if (!dbusHostPath.isEmpty()) + qmakeVars += QString("QT_HOST_CFLAGS_DBUS = -I%1/include").arg(dbusHostPath); } if (dictionary[ "SQL_MYSQL" ] != "no" && !mysqlPath.isEmpty()) { qmakeVars += QString("QT_CFLAGS_MYSQL = -I%1/include").arg(mysqlPath); diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index 98e4912eaa..5f118ddd39 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -140,6 +140,7 @@ private: QString opensslLibsRelease; QString opensslPath; QString dbusPath; + QString dbusHostPath; QString mysqlPath; QString psqlLibs; QString zlibLibs; |