use centralized qml plugin project handling
Change-Id: If9561a27d9b96d020e2ffcf2dcc6deedb4d89e4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
4bf74dece7
commit
d18eadc8ab
@@ -1,7 +1,8 @@
|
||||
CXX_MODULE = multimedia
|
||||
TARGET = declarative_audioengine
|
||||
TARGETPATH = QtAudioEngine
|
||||
IMPORT_VERSION = 1.0
|
||||
|
||||
include(../qimportbase.pri)
|
||||
QT += quick qml multimedia-private
|
||||
|
||||
win32: LIBS += -lOpenAL32
|
||||
@@ -9,9 +10,6 @@ unix:!mac: LIBS += -lopenal
|
||||
mac: LIBS += -framework OpenAL
|
||||
mac: DEFINES += HEADER_OPENAL_PREFIX
|
||||
|
||||
DESTDIR = $$QT.multimedia.imports/$$TARGETPATH
|
||||
target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
|
||||
|
||||
INCLUDEPATH += ../../multimedia/audio
|
||||
|
||||
HEADERS += \
|
||||
@@ -44,29 +42,4 @@ SOURCES += \
|
||||
qsoundsource_openal_p.cpp \
|
||||
qaudioengine_openal_p.cpp
|
||||
|
||||
# plugin.qmltypes is used by Qt Creator for syntax highlighting and the QML code model. It needs
|
||||
# to be regenerated whenever the QML elements exported by the plugin change. This cannot be done
|
||||
# automatically at compile time because qmlplugindump does not support some QML features and it may
|
||||
# not be possible when cross-compiling.
|
||||
#
|
||||
# To regenerate run 'make qmltypes' which will update the plugins.qmltypes file in the source
|
||||
# directory. Then review and commit the changes made to plugins.qmltypes.
|
||||
#
|
||||
# This will run the following command:
|
||||
# qmlplugindump <import name> <import version> <path to import plugin> > plugins.qmltypes
|
||||
# e.g.:
|
||||
# qmlplugindump QtAudioEngine 5.0 imports/QtAudioEngine/libdeclarative_audioengine.so > plugins.qmltypes
|
||||
|
||||
load(resolve_target)
|
||||
qmltypes.target = qmltypes
|
||||
qmltypes.commands = $$[QT_INSTALL_BINS]/qmlplugindump QtAudioEngine 1.0 $$QMAKE_RESOLVED_TARGET > $$PWD/plugins.qmltypes
|
||||
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
|
||||
QMAKE_EXTRA_TARGETS += qmltypes
|
||||
|
||||
# Tell qmake to create such makefile that qmldir, plugins.qmltypes and target
|
||||
# (i.e. declarative_audioengine) are all copied to $$[QT_INSTALL_IMPORTS]/QtAudioEngine directory,
|
||||
|
||||
qmldir.files += $$PWD/qmldir $$PWD/plugins.qmltypes
|
||||
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
|
||||
|
||||
INSTALLS += target qmldir
|
||||
load(qml_plugin)
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
TARGET = declarative_multimedia
|
||||
TARGETPATH = QtMultimedia
|
||||
|
||||
include(../qimportbase.pri)
|
||||
|
||||
QT += qml quick network multimedia-private
|
||||
|
||||
DESTDIR = $$QT.multimedia.imports/$$TARGETPATH
|
||||
target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
|
||||
|
||||
LIBS += -lQtMultimediaQuick_p -L$$QT.multimedia.libs
|
||||
|
||||
HEADERS += \
|
||||
@@ -53,32 +45,7 @@ SOURCES += \
|
||||
qdeclarativecamerapreviewprovider.cpp \
|
||||
qdeclarativetorch.cpp
|
||||
|
||||
OTHER_FILES += \
|
||||
QML_FILES += \
|
||||
Video.qml
|
||||
|
||||
# plugin.qmltypes is used by Qt Creator for syntax highlighting and the QML code model. It needs
|
||||
# to be regenerated whenever the QML elements exported by the plugin change. This cannot be done
|
||||
# automatically at compile time because qmlplugindump does not support some QML features and it may
|
||||
# not be possible when cross-compiling.
|
||||
#
|
||||
# To regenerate run 'make qmltypes' which will update the plugins.qmltypes file in the source
|
||||
# directory. Then review and commit the changes made to plugins.qmltypes.
|
||||
#
|
||||
# This will run the following command:
|
||||
# qmlplugindump <import name> <import version> <path to import plugin> > plugins.qmltypes
|
||||
# e.g.:
|
||||
# qmlplugindump QtMultimedia 5.0 imports/QtMultimedia/libdeclarative_multimedia.so > plugins.qmltypes
|
||||
|
||||
load(resolve_target)
|
||||
qmltypes.target = qmltypes
|
||||
qmltypes.commands = $$[QT_INSTALL_BINS]/qmlplugindump QtMultimedia 5.0 $$QMAKE_RESOLVED_TARGET > $$PWD/plugins.qmltypes
|
||||
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
|
||||
QMAKE_EXTRA_TARGETS += qmltypes
|
||||
|
||||
# Tell qmake to create such makefile that qmldir, plugins.qmltypes and target
|
||||
# (i.e. declarative_multimedia) are all copied to $$[QT_INSTALL_IMPORTS]/QtMultimedia directory,
|
||||
|
||||
qmldir.files += $$PWD/qmldir $$PWD/plugins.qmltypes $$PWD/Video.qml
|
||||
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
|
||||
|
||||
INSTALLS += target qmldir
|
||||
load(qml_plugin)
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
load(qt_module)
|
||||
|
||||
TEMPLATE = lib
|
||||
CONFIG += qt plugin
|
||||
|
||||
win32|mac:!win32-msvc:!macx-xcode:CONFIG += debug_and_release
|
||||
|
||||
isEmpty(TARGETPATH) {
|
||||
error("qimportbase.pri: You must provide a TARGETPATH!")
|
||||
}
|
||||
isEmpty(TARGET) {
|
||||
error("qimportbase.pri: You must provide a TARGET!")
|
||||
}
|
||||
|
||||
QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir
|
||||
copy2build.input = QMLDIRFILE
|
||||
copy2build.output = $$QT.multimedia.imports/$$TARGETPATH/qmldir
|
||||
!contains(TEMPLATE_PREFIX, vc):copy2build.variable_out = PRE_TARGETDEPS
|
||||
copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
|
||||
copy2build.name = COPY ${QMAKE_FILE_IN}
|
||||
copy2build.CONFIG += no_link
|
||||
# `clean' should leave the build in a runnable state, which means it shouldn't delete qmldir
|
||||
copy2build.CONFIG += no_clean
|
||||
QMAKE_EXTRA_COMPILERS += copy2build
|
||||
|
||||
TARGET = $$qtLibraryTarget($$TARGET)
|
||||
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
|
||||
|
||||
load(qt_targets)
|
||||
|
||||
Reference in New Issue
Block a user