2012-07-09 17:17:00 +00:00
|
|
|
load(qt_build_config)
|
|
|
|
|
|
|
|
TEMPLATE = lib
|
|
|
|
CONFIG += plugin
|
|
|
|
|
2012-10-16 09:51:29 +00:00
|
|
|
if(win32|mac):!macx-xcode {
|
|
|
|
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
|
|
|
|
contains(QT_CONFIG, build_all):CONFIG += build_all
|
|
|
|
}
|
|
|
|
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
|
|
|
|
contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
|
|
|
|
contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
|
|
|
|
contains(QT_CONFIG, c++11):CONFIG += c++11
|
|
|
|
|
2012-07-09 17:17:00 +00:00
|
|
|
isEmpty(CXX_MODULE) {
|
|
|
|
CXX_MODULE = $$TARGET
|
|
|
|
TARGET = declarative_$${TARGET}
|
|
|
|
}
|
|
|
|
isEmpty(TARGETPATH): TARGETPATH = $$eval(QT.$${CXX_MODULE}.name)
|
|
|
|
DESTDIR = $$eval(QT.$${CXX_MODULE}.imports)/$$TARGETPATH
|
|
|
|
|
|
|
|
QMLTYPEFILE = $$_PRO_FILE_PWD_/plugins.qmltypes
|
2012-08-06 18:39:49 +00:00
|
|
|
exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
|
2012-07-09 17:17:00 +00:00
|
|
|
|
|
|
|
# Install rules
|
|
|
|
|
2012-10-26 13:26:34 +00:00
|
|
|
qml1_target: \
|
|
|
|
instbase = $$[QT_INSTALL_IMPORTS]/QtDeclarative
|
|
|
|
else: \
|
|
|
|
instbase = $$[QT_INSTALL_IMPORTS]
|
|
|
|
|
|
|
|
target.path = $$instbase/$$TARGETPATH
|
2012-08-06 18:39:49 +00:00
|
|
|
INSTALLS += target
|
2012-07-09 17:17:00 +00:00
|
|
|
|
|
|
|
# Some final setup
|
|
|
|
|
|
|
|
TARGET = $$qtLibraryTarget($$TARGET)
|
|
|
|
|
|
|
|
load(qt_targets)
|
2012-08-06 14:43:43 +00:00
|
|
|
|
|
|
|
# plugins.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.
|
|
|
|
#
|
|
|
|
!cross_compile {
|
2012-10-23 14:46:32 +00:00
|
|
|
build_pass|!debug_and_release {
|
|
|
|
isEmpty(IMPORT_VERSION): IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION)
|
|
|
|
|
|
|
|
load(resolve_target)
|
2012-10-26 13:26:34 +00:00
|
|
|
qml1_target: \
|
|
|
|
qmlplugindump = qml1plugindump
|
|
|
|
else: \
|
|
|
|
qmlplugindump = qmlplugindump
|
|
|
|
qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump)
|
2012-10-23 18:10:25 +00:00
|
|
|
importpath.value =
|
|
|
|
for(qmod, QMAKEMODULES) {
|
|
|
|
qmod = $$section(qmod, /, 0, -3)/imports
|
2012-10-26 13:26:34 +00:00
|
|
|
qml1_target: qmod = $$qmod/QtDeclarative
|
2012-10-23 18:10:25 +00:00
|
|
|
exists($$qmod): importpath.value += $$shell_path($$qmod)
|
|
|
|
}
|
|
|
|
importpath.name = QML_IMPORT_PATH
|
|
|
|
importpath.value = $$unique(importpath.value)
|
|
|
|
qtAddToolEnv(QMLPLUGINDUMP, importpath)
|
|
|
|
TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )
|
2012-10-23 14:46:32 +00:00
|
|
|
qmltypes.target = qmltypes
|
2012-10-23 18:10:25 +00:00
|
|
|
qmltypes.commands = $$QMLPLUGINDUMP $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
|
2012-10-23 14:46:32 +00:00
|
|
|
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
|
|
|
|
} else {
|
|
|
|
qmltypes.CONFIG += recursive
|
|
|
|
}
|
2012-08-06 14:43:43 +00:00
|
|
|
QMAKE_EXTRA_TARGETS += qmltypes
|
|
|
|
}
|
2012-08-06 18:39:49 +00:00
|
|
|
|
|
|
|
load(qml_module)
|