adopted for the case where both QtWebKit and QtWebEngine is installed.

This commit is contained in:
2017-04-11 18:52:02 +02:00
parent f6741a470a
commit de3d4ca932

View File

@ -6,14 +6,16 @@ packagesExist(Qt5WebEngine) {
DEFINES += HAVE_QT_WEB_ENGINE DEFINES += HAVE_QT_WEB_ENGINE
HAVE_QT_WEB_ENGINE = 1 HAVE_QT_WEB_ENGINE = 1
} }
packagesExist(QtWebKit) { isEmpty( HAVE_QT_WEB_ENGINE ) {
message("QtWebKit found") packagesExist(QtWebKit) {
HAVE_QT_WEB_ENGINE = 0 message("QtWebKit found")
} HAVE_QT_WEB_ENGINE = 0
# Mac calls it Qt5WebKit, hence }
packagesExist(Qt5WebKit) { # Mac calls it Qt5WebKit, hence
message("Qt5WebKit found") packagesExist(Qt5WebKit) {
HAVE_QT_WEB_ENGINE = 0 message("Qt5WebKit found")
HAVE_QT_WEB_ENGINE = 0
}
} }
isEmpty(HAVE_QT_WEB_ENGINE) { isEmpty(HAVE_QT_WEB_ENGINE) {
message("Neither Qt(5)WebKit nor Qt5WebEngine found. Something is wrong, please check") message("Neither Qt(5)WebKit nor Qt5WebEngine found. Something is wrong, please check")
@ -89,12 +91,12 @@ CONFIG += qt \
QT += widgets QT += widgets
QT += xml QT += xml
isEqual(HAVE_QT_WEB_ENGINE, 1) {
QT += webenginewidgets
}
isEqual(HAVE_QT_WEB_ENGINE, 0) { isEqual(HAVE_QT_WEB_ENGINE, 0) {
QT += webkitwidgets QT += webkitwidgets
} }
isEqual(HAVE_QT_WEB_ENGINE, 1) {
QT += webenginewidgets
}
QT += network QT += network
QT += printsupport QT += printsupport
QT += svg QT += svg