Add possibility to add OpenSSL, DBUS, MySQL path under Windows
Under Windows it's quite possible that OpenSSL, DBUS or MySQL is not installed into a central place. If -I and -L is passed at configure time, it is added to all targets, and if that path contained a conflicting header things would go wrong. Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
bd7331cb33
commit
0ef4bf1c1e
@ -5,6 +5,11 @@ QT = core-private
|
||||
CONFIG += link_pkgconfig
|
||||
MODULE_CONFIG = dbusadaptors dbusinterfaces
|
||||
|
||||
!isEmpty(DBUS_PATH) {
|
||||
INCLUDEPATH += $$DBUS_PATH/include
|
||||
QMAKE_LIBDIR += $$DBUS_PATH/lib
|
||||
}
|
||||
|
||||
DEFINES += DBUS_API_SUBJECT_TO_CHANGE
|
||||
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
|
||||
contains(QT_CONFIG, dbus-linked) {
|
||||
|
@ -41,4 +41,9 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
|
||||
|
||||
LIBS_PRIVATE += $$OPENSSL_LIBS
|
||||
windows:LIBS += -lcrypt32
|
||||
|
||||
!isEmpty(OPENSSL_PATH) {
|
||||
INCLUDEPATH += $$OPENSSL_PATH/include
|
||||
QMAKE_LIBDIR += $$OPENSSL_PATH/lib
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,11 @@
|
||||
HEADERS += $$PWD/qsql_mysql.h
|
||||
SOURCES += $$PWD/qsql_mysql.cpp
|
||||
|
||||
!isEmpty(MYSQL_PATH) {
|
||||
INCLUDEPATH += $$MYSQL_PATH/include
|
||||
QMAKE_LIBDIR += $$MYSQL_PATH/lib
|
||||
}
|
||||
|
||||
unix {
|
||||
isEmpty(QT_LFLAGS_MYSQL) {
|
||||
!contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
|
||||
|
@ -12,6 +12,8 @@ INCLUDEPATH += $$QT_BUILD_TREE/include \
|
||||
$$QT_BUILD_TREE/include/QtDBus/$$QT_VERSION/QtDBus \
|
||||
$$QT_SOURCE_TREE/src/dbus
|
||||
|
||||
!isEmpty(DBUS_PATH): INCLUDEPATH += $$DBUS_PATH/include
|
||||
|
||||
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
|
||||
|
||||
SOURCES += qdbuscpp2xml.cpp \
|
||||
|
@ -12,6 +12,8 @@ INCLUDEPATH += $$QT_BUILD_TREE/include \
|
||||
$$QT_BUILD_TREE/include/QtDBus/$$QT_VERSION/QtDBus \
|
||||
$$QT_SOURCE_TREE/src/dbus
|
||||
|
||||
!isEmpty(DBUS_PATH): INCLUDEPATH += $$DBUS_PATH/include
|
||||
|
||||
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
|
||||
|
||||
SOURCES = qdbusxml2cpp.cpp \
|
||||
|
@ -953,12 +953,18 @@ void Configure::parseCmdLine()
|
||||
opensslLibsDebug = configCmdLine.at(i);
|
||||
} else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS_RELEASE=")) {
|
||||
opensslLibsRelease = configCmdLine.at(i);
|
||||
} else if (configCmdLine.at(i).startsWith("OPENSSL_PATH=")) {
|
||||
opensslPath = QDir::fromNativeSeparators(configCmdLine.at(i));
|
||||
} else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) {
|
||||
psqlLibs = configCmdLine.at(i);
|
||||
} else if (configCmdLine.at(i).startsWith("SYBASE=")) {
|
||||
sybase = configCmdLine.at(i);
|
||||
} else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) {
|
||||
sybaseLibs = configCmdLine.at(i);
|
||||
} else if (configCmdLine.at(i).startsWith("DBUS_PATH=")) {
|
||||
dbusPath = QDir::fromNativeSeparators(configCmdLine.at(i));
|
||||
} else if (configCmdLine.at(i).startsWith("MYSQL_PATH=")) {
|
||||
mysqlPath = QDir::fromNativeSeparators(configCmdLine.at(i));
|
||||
}
|
||||
|
||||
else if ((configCmdLine.at(i) == "-override-version") || (configCmdLine.at(i) == "-version-override")){
|
||||
@ -2544,7 +2550,14 @@ void Configure::generateOutputVars()
|
||||
} else if (opensslLibs.isEmpty()) {
|
||||
qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32");
|
||||
}
|
||||
if (!opensslPath.isEmpty())
|
||||
qmakeVars += opensslPath;
|
||||
}
|
||||
if (dictionary[ "DBUS" ] != "no" && !dbusPath.isEmpty())
|
||||
qmakeVars += dbusPath;
|
||||
if (dictionary[ "SQL_MYSQL" ] != "no" && !mysqlPath.isEmpty())
|
||||
qmakeVars += mysqlPath;
|
||||
|
||||
if (!psqlLibs.isEmpty())
|
||||
qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1);
|
||||
|
||||
|
@ -143,6 +143,9 @@ private:
|
||||
QString opensslLibs;
|
||||
QString opensslLibsDebug;
|
||||
QString opensslLibsRelease;
|
||||
QString opensslPath;
|
||||
QString dbusPath;
|
||||
QString mysqlPath;
|
||||
QString psqlLibs;
|
||||
QString sybase;
|
||||
QString sybaseLibs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user