Skip to content

Commit

Permalink
Merge branch '5.4build'
Browse files Browse the repository at this point in the history
Conflicts:
	examples/common/common.pro
  • Loading branch information
wang-bin committed Nov 4, 2014
2 parents d36f12c + ebb02d4 commit 6c7a4f6
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 43 deletions.
43 changes: 31 additions & 12 deletions common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,40 @@ defineTest(qtRunQuitly) {
return(true)
}

defineReplace(platformTargetSuffix) {
ios:CONFIG(iphonesimulator, iphonesimulator|iphoneos): \
suffix = _iphonesimulator
else: \
suffix =

CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac: return($${suffix}_debug)
win32: return($${suffix}d)
}
}
return($$suffix)
}

#Acts like qtLibraryTarget. From qtcreator.pri
defineReplace(qtLibName) {
#TEMPLATE += fakelib
#LIB_FULLNAME = $$qtLibraryTarget($$1)
#TEMPLATE -= fakelib
unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac:!mac_framework:RET = $$member(LIBRARY_NAME, 0)_debug
else:win32:RET = $$member(LIBRARY_NAME, 0)d
}
}
isEmpty(RET):RET = $$LIBRARY_NAME
!win32: return($$RET)
unset(RET)
RET = $$1
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,
}
}
RET = $$RET$$platformTargetSuffix()
!win32: return($$RET)

isEmpty(2): VERSION_EXT = $$VERSION
else: VERSION_EXT = $$2
Expand All @@ -108,7 +127,7 @@ defineReplace(qtLibName) {
}
RET = $${RET}$${VERSION_EXT}
unset(VERSION_EXT)
return($$RET)
return($$RET)
}


Expand Down Expand Up @@ -338,7 +357,7 @@ defineTest(preparePaths) {
!build_pass {
message(target: $$DESTDIR/$$TARGET)
!isEmpty(PROJECTROOT) {
TRANSLATIONS *= $$PROJECTROOT/i18n/$${TARGET}_zh-cn.ts $$PROJECTROOT/i18n/$${TARGET}_zh_CN.ts
TRANSLATIONS *= i18n/$${TARGET}_zh_CN.ts
export(TRANSLATIONS)
}
}
Expand Down
19 changes: 14 additions & 5 deletions examples/common/common.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
#-------------------------------------------------
# Qt4 need QDesktopServices
QT = core gui
# android apk hack
android {
QT += svg
LIBS += -lQtAV #QML app does not link to libQtAV but we need it. why no QmlAV plugin if remove this?
}

TARGET = common
TEMPLATE = lib
DEFINES += BUILD_QOPT_LIB

CONFIG *= common-buildlib

#var with '_' can not pass to pri?
Expand All @@ -21,6 +18,18 @@ PROJECTROOT = $$PWD/../..
!include(libcommon.pri): error("could not find libcommon.pri")
preparePaths($$OUT_PWD/../../out)


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

RESOURCES += \
theme/theme.qrc

Expand Down
5 changes: 0 additions & 5 deletions examples/common/libcommon.pri
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ CONFIG += depend_includepath #?

PROJECT_SRCPATH = $$PWD
PROJECT_LIBDIR = $$qtLongName($$BUILD_DIR/lib)
#for system include path
*msvc* {
} else {
QMAKE_CXXFLAGS += -isystem $$PROJECT_SRCPATH -isystem $$PROJECT_SRCPATH/..
}
INCLUDEPATH *= $$PROJECT_SRCPATH $$PROJECT_SRCPATH/.. $$PROJECT_SRCPATH/$$NAME
DEPENDPATH *= $$PROJECT_SRCPATH
#QMAKE_LFLAGS_RPATH += #will append to rpath dir
Expand Down
5 changes: 0 additions & 5 deletions qml/libQmlAV.pri
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ CONFIG += depend_includepath #?

PROJECT_SRCPATH = $$PWD
PROJECT_LIBDIR = $$qtLongName($$BUILD_DIR/lib)
#for system include path
*msvc* {
} else {
QMAKE_CXXFLAGS += -isystem $$PROJECT_SRCPATH -isystem $$PROJECT_SRCPATH/..
}
INCLUDEPATH *= $$PROJECT_SRCPATH $$PROJECT_SRCPATH/.. $$PROJECT_SRCPATH/$$NAME
DEPENDPATH *= $$PROJECT_SRCPATH
#QMAKE_LFLAGS_RPATH += #will append to rpath dir
Expand Down
5 changes: 0 additions & 5 deletions src/libQtAV.pri
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ mac_framework: PROJECT_TARGETNAME = $$NAME

PROJECT_SRCPATH = $$PWD
PROJECT_LIBDIR = $$qtLongName($$BUILD_DIR/lib)
#for system include path
*msvc* {
} else {
QMAKE_CXXFLAGS += -isystem $$PROJECT_SRCPATH -isystem $$PROJECT_SRCPATH/..
}
INCLUDEPATH *= $$PROJECT_SRCPATH $$PROJECT_SRCPATH/.. $$PROJECT_SRCPATH/$$NAME
DEPENDPATH *= $$PROJECT_SRCPATH
#QMAKE_LFLAGS_RPATH += #will append to rpath dir
Expand Down
16 changes: 9 additions & 7 deletions src/libQtAV.pro
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,14 @@ mac {

unix:!android:!mac {
#debian
DEB_INSTALL_LIST = .$$[QT_INSTALL_LIBS]/libQtAV.so.*
DEB_INSTALL_LIST = .$$[QT_INSTALL_LIBS]/libQt*AV.so.*
libqtav.target = libqtav.install
libqtav.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROOT/debian/$${libqtav.target}
QMAKE_EXTRA_TARGETS += libqtav
target.depends *= $${libqtav.target}

DEB_INSTALL_LIST = $$join(SDK_HEADERS, \\n.$$[QT_INSTALL_HEADERS]/, .$$[QT_INSTALL_HEADERS]/)
DEB_INSTALL_LIST += .$$[QT_INSTALL_LIBS]/libQtAV.prl .$$[QT_INSTALL_LIBS]/libQtAV.so
DEB_INSTALL_LIST += .$$[QT_INSTALL_LIBS]/libQt*AV.prl .$$[QT_INSTALL_LIBS]/libQt*AV.so
DEB_INSTALL_LIST += .$$[QT_INSTALL_BINS]/../mkspecs/features/av.prf .$$[QT_INSTALL_BINS]/../mkspecs/modules/qt_lib_av.pri
qtav_dev.target = qtav-dev.install
qtav_dev.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROOT/debian/$${qtav_dev.target}
Expand All @@ -453,11 +453,13 @@ qtav_private_dev.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROO
QMAKE_EXTRA_TARGETS += qtav_private_dev
target.depends *= $${qtav_private_dev.target}

qtav_dev_links.target = qtav-dev.links
qtav_dev_links.commands = echo \"$$[QT_INSTALL_LIBS]/libQtAV.so $$[QT_INSTALL_LIBS]/libQt$${QT_MAJOR_VERSION}AV.so\" >$$PROJECTROOT/debian/$${qtav_dev_links.target}
QMAKE_EXTRA_TARGETS *= qtav_dev_links
target.depends *= $${qtav_dev_links.target}
}
greaterThan(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 4) {
qtav_dev_links.target = qtav-dev.links
qtav_dev_links.commands = echo \"$$[QT_INSTALL_LIBS]/libQtAV.so $$[QT_INSTALL_LIBS]/libQt$${QT_MAJOR_VERSION}AV.so\" >$$PROJECTROOT/debian/$${qtav_dev_links.target}
QMAKE_EXTRA_TARGETS *= qtav_dev_links
target.depends *= $${qtav_dev_links.target}
} #Qt<5.4
} #debian

MODULE_INCNAME = QtAV
MODULE_VERSION = $$VERSION
Expand Down
8 changes: 4 additions & 4 deletions tools/install_sdk/install_sdk.pro
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mac_framework {
sdk_install.commands += $$quote($$COPY_DIR $$system_path($$PROJECTROOT/src/QtAV/private) $$system_path($$[QT_INSTALL_HEADERS]/QtAV/private))
sdk_install.commands += $$quote($$MKDIR $$system_path($$[QT_INSTALL_HEADERS]/QtAV/$$VERSION/QtAV/))
sdk_install.commands += $$quote($$COPY_DIR $$system_path($$PROJECTROOT/src/QtAV/private) $$system_path($$[QT_INSTALL_HEADERS]/QtAV/$$VERSION/QtAV/private))
sdk_install.commands += $$quote($$COPY $$system_path($$PROJECT_LIBDIR/*QtAV*) $$system_path($$[QT_INSTALL_LIBS]/))
sdk_install.commands += $$quote($$COPY $$system_path($$PROJECT_LIBDIR/*Qt*AV*) $$system_path($$[QT_INSTALL_LIBS]/))
sdk_install.commands += $$quote($$COPY $$system_path($$PROJECT_LIBDIR/$$ORIG_LIB) $$system_path($$[QT_INSTALL_LIBS]/$$NEW_LIB))
}
sdk_install.commands += $$quote($$COPY_DIR $$system_path($$PROJECTROOT/qml/QmlAV) $$system_path($$[QT_INSTALL_HEADERS]/QmlAV))
Expand All @@ -69,14 +69,14 @@ sdk_install.commands += $$quote($$COPY $$system_path($$MODULE_PRF_FILE) $$system
sdk_install.commands += $$quote($$COPY $$system_path($$OUT_PWD/mkspecs/modules/qt_lib_av*.pri) $$system_path($$MKSPECS_DIR/modules/))
sdk_install.commands += $$quote($$COPY $$system_path($$PROJECTROOT/qml/plugins.qmltypes) $$system_path($$[QT_INSTALL_QML]/QtAV/))

win32: sdk_install.commands += $$quote($$MOVE $$system_path($$[QT_INSTALL_LIBS]/QtAV*.dll) $$system_path($$[QT_INSTALL_BINS]/))
win32: sdk_install.commands += $$quote($$MOVE $$system_path($$[QT_INSTALL_LIBS]/Qt*AV*.dll) $$system_path($$[QT_INSTALL_BINS]/))
## copy libcommon.so requred by QMLPlayer and player
android: sdk_install.commands += $$quote($$COPY $$system_path($$PROJECT_LIBDIR/libcommon.so) $$system_path($$[QT_INSTALL_LIBS]/))

mac_framework {
sdk_uninstall.commands = $$quote($$RM_DIR $$system_path($$[QT_INSTALL_LIBS]/QtAV.framework))
} else {
sdk_uninstall.commands = $$quote($$QMAKE_DEL_FILE $$system_path($$[QT_INSTALL_LIBS]/*QtAV*))
sdk_uninstall.commands = $$quote($$QMAKE_DEL_FILE $$system_path($$[QT_INSTALL_LIBS]/*Qt*AV*))
}
sdk_uninstall.commands += $$quote($$QMAKE_DEL_FILE $$system_path($$[QT_INSTALL_LIBS]/$$NEW_LIB))
sdk_uninstall.commands += $$quote($$RM_DIR $$system_path($$[QT_INSTALL_HEADERS]/QtAV))
Expand All @@ -86,7 +86,7 @@ sdk_uninstall.commands += $$quote($$QMAKE_DEL_FILE $$system_path($$MKSPECS_DIR/m
greaterThan(QT_MAJOR_VERSION, 4) {
sdk_uninstall.commands += $$quote($$RM_DIR $$system_path($$[QT_INSTALL_QML]/QtAV))
}
win32: sdk_uninstall.commands += $$quote($$QMAKE_DEL_FILE $$system_path($$[QT_INSTALL_BINS]/QtAV*.dll))
win32: sdk_uninstall.commands += $$quote($$QMAKE_DEL_FILE $$system_path($$[QT_INSTALL_BINS]/Qt*AV*.dll))
android: sdk_uninstall.commands += $$quote($$QMAKE_DEL_FILE $$system_path($$[QT_INSTALL_LIBS]/libcommon.so))

SCRIPT_SUFFIX=sh
Expand Down

0 comments on commit 6c7a4f6

Please sign in to comment.