Skip to content

Commit

Permalink
qmake: fix build for qt>=5.4.2
Browse files Browse the repository at this point in the history
qtLibraryTarget was broken in Qt5.4.1/0 and now is fixed in 5.4.2.
  • Loading branch information
wang-bin committed Apr 23, 2015
1 parent 251dd3e commit 6974f05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 108,15 @@ defineReplace(qtLibName) {
#TEMPLATE -= fakelib
unset(RET)
RET = $$1
#qt5.4.2 add qt5LibraryTarget to fix qtLibraryTarget break
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$RET
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
} else {
# insert the major version of Qt in the library name
# unless it's a framework build
RET ~= s,^Qt,Qt$$QT_MAJOR_VERSION,
isEqual(QT_MINOR_VERSION,4):lessThan(QT_PATCH_VERSION, 2):RET ~= s,^Qt,Qt$$QT_MAJOR_VERSION,
}
}
RET = $$RET$$platformTargetSuffix()
Expand Down
6 changes: 4 additions & 2 deletions examples/common/common.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 17,18 @@ PROJECTROOT = $$PWD/../..
!include(libcommon.pri): error("could not find libcommon.pri")
preparePaths($$OUT_PWD/../../out)


INCLUDEPATH = $$PROJECTROOT/src
# android apk hack
android {
QT = svg
LIBS = -L$$qtLongName($$BUILD_DIR/lib)
greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) {
isEqual(QT_MAJOR_VERSION, 5):isEqual(QT_MINOR_VERSION, 4):lessThan(QT_PATCH_VERSION, 2) {
LIBS = -lQt5AV
} else {
LIBS = -lQtAV #QML app does not link to libQtAV but we need it. why no QmlAV plugin if remove this?
}
} else {
#include($$PROJECTROOT/libQtAV.pri)
}

RESOURCES = \
Expand Down

0 comments on commit 6974f05

Please sign in to comment.