summaryrefslogtreecommitdiffstats
path: root/pkg.pri
diff options
context:
space:
mode:
authorPatrick Burke <patrick.burke@nokia.com>2011-07-18 16:44:46 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-02 10:47:58 +0200
commitc161bd4e3f8cb4b16214a144afccab32e4168f48 (patch)
treede2b5c28f9ac0434fe3b9d8061a25ede28f9923f /pkg.pri
parent04955b2e5b834f7040dfd5f426fc13cfba18c452 (diff)
Build system refactorings - squashed.
Deployment updates. Reviewed-on: http://codereview.qt.nokia.com/1732 Deployment updates. Reviewed-on: http://codereview.qt.nokia.com/1856 More deployment updates. Reviewed-on: http://codereview.qt.nokia.com/1912 Tidying up build system removing need for qml_pkg.pri. Reviewed-on: http://codereview.qt.nokia.com/2229 Tidying up build system removing need for qt3dquick_pkg_dep.pri. Reviewed-on: http://codereview.qt.nokia.com/2230 Tidying up build system removing need for qt3d_pkg_dep.pri. Reviewed-on: http://codereview.qt.nokia.com/2232 Final major change to cleanup build system. Should eliminate problems where the "qml" directories aren't being updated upon rebuilds, and allows easier deployment to devices via Qt Creator. Reviewed-on: http://codereview.qt.nokia.com/2247 Change-Id: Iedc926ef421fcb9039833c328cca8b0802b3bd44 Reviewed-on: http://codereview.qt.nokia.com/2494 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to 'pkg.pri')
-rw-r--r--pkg.pri198
1 files changed, 191 insertions, 7 deletions
diff --git a/pkg.pri b/pkg.pri
index 22e5d53fb..e69eaafac 100644
--- a/pkg.pri
+++ b/pkg.pri
@@ -1,13 +1,8 @@
-!CONFIG(pkg_pri_included) {
-CONFIG+=pkg_pri_included
-
# Config for making example and demo apps packageable
# Note that the paths here all assumed the including .pro file
# is exactly 3 levels of directory tree below the root
-# Include this file after qt3d_pkg_dep.pri or qt3dquick_pkg_dep.pri
-
qtc_harmattan {
CONFIG += maemo
CONFIG += package
@@ -26,6 +21,54 @@ qtc_harmattan {
QT3D_INSTALL_DATA = $$[QT_INSTALL_DATA]
}
+qt3dquick_deploy_pkg {
+ CONFIG += qt3d_deploy_pkg
+
+ package {
+ macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
+ LIBS += -framework Qt3DQuick -F../../../src/quick3d
+ INCLUDEPATH += ../../../src/quick3d/Qt3DQuick.framework/Versions/1/Headers
+ } else {
+ win32 {
+ CONFIG(debug, debug|release) {
+ TARGET = $$member(TARGET, 0)d
+ LIBS += ..\\..\\..\\src\\quick3d\\debug\\Qt3DQuickd.lib
+ } else {
+ LIBS += ..\\..\\..\\src\\quick3d\\release\\Qt3DQuick.lib
+ }
+ } else {
+ LIBS += -L../../../src/quick3d -lQt3DQuick
+ }
+ INCLUDEPATH += ../../../include/Qt3DQuick
+ }
+ QT += declarative opengl
+
+ maemo: icons.files = icon-l-qtquick3d.png
+ }
+}
+
+qt3d_deploy_pkg {
+ package {
+ macx:CONFIG(qt_framework, qt_framework|qt_no_framework) {
+ LIBS += -framework Qt3D -F../../../src/threed
+ INCLUDEPATH += ../../../src/threed/Qt3D.framework/Versions/1/Headers
+ } else {
+ win32 {
+ CONFIG(debug, debug|release) {
+ TARGET = $$member(TARGET, 0)d
+ LIBS += ..\\..\\..\\src\\threed\\debug\\Qt3Dd.lib
+ } else {
+ LIBS += ..\\..\\..\\src\\threed\\release\\Qt3D.lib
+ }
+ } else {
+ LIBS += -L../../../src/threed -lQt3D
+ }
+ INCLUDEPATH += ../../../include/Qt3D
+ }
+ QT += opengl
+ }
+}
+
contains(TEMPLATE, app) {
package {
maemo {
@@ -35,11 +78,152 @@ contains(TEMPLATE, app) {
# icons.files is set by qt3dquick_pkg_dep.pri or qt3d_pkg_dep.pri
icons.path = /usr/share/themes/base/meegotouch/icons
INSTALLS += icons applnk
+
+ target.path += $$QT3D_INSTALL_BINS
+ INSTALLS += target
+ } else {
+ mt {
+ applnk.files = info.json
+ applnk.path = /opt/mt/applications/$${TARGET}
+
+ # icons.files is set by qt3dquick_pkg_dep.pri or qt3d_pkg_dep.pri
+ icons.path = /opt/mt/applications/$${TARGET}
+ INSTALLS += icons applnk
+ target.path += /opt/mt/applications/$${TARGET}
+ INSTALLS += target
+
+ DEFINES += QT3D_USE_OPT=$${TARGET}
+ } else {
+ target.path += $$QT3D_INSTALL_BINS
+ INSTALLS += target
+ }
}
- target.path += $$QT3D_INSTALL_BINS
- INSTALLS += target
} else {
DESTDIR = ../../../bin
}
}
+
+qt3d_deploy_qml {
+ mt {
+ TARGET_DIR = /opt/mt/applications/$$TARGET
+ } else {
+ TARGET_DIR = $$QT3D_INSTALL_DATA/quick3d/examples/$$TARGET
+ }
+
+ macx {
+ TARGET_DIR = .
+ } else {
+ !package {
+ TARGET_DIR = ../../../bin/resources/examples/$$TARGET
+ }
+ }
+
+ for(dir, INSTALL_DIRS) {
+ di.source = $${dir}
+ di.target = $$TARGET_DIR
+ DEPLOYMENTFOLDERS += di
+ }
+}
+
+# The following code was generated by the Qt Quick Application wizard of Qt Creator.
+# The file it was contained in was qmlapplicationviewer.pri, if necessary it should
+# be possible to simply cut & paste the code straight out of the latest version to
+# update it.
+#
+# The only changes has been to comment out the installPrexfix line below, this
+# will probably be necessary to replicate when replacing.
+#
+defineTest(qtcAddDeployment) {
+ MAINPROFILEPWD = $$PWD
+
+ win32 {
+ copyCommand =
+ for(deploymentfolder, DEPLOYMENTFOLDERS) {
+ source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
+ source = $$replace(source, /, \\)
+ sourcePathSegments = $$split(source, \\)
+ target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
+ target = $$replace(target, /, \\)
+ !isEqual(source,$$target) {
+ !isEmpty(copyCommand):copyCommand += &&
+ isEqual(QMAKE_DIR_SEP, \\) {
+ copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
+ } else {
+ source = $$replace(source, \\\\, /)
+ target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+ target = $$replace(target, \\\\, /)
+ copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
+ }
+ }
+ }
+ !isEmpty(copyCommand) {
+ copyCommand = @echo Copying application data... && $$copyCommand
+ copydeploymentfolders.commands = $$copyCommand
+ first.depends = $(first) copydeploymentfolders
+ export(first.depends)
+ export(copydeploymentfolders.commands)
+ QMAKE_EXTRA_TARGETS += first copydeploymentfolders
+ }
+ } else:unix {
+ maemo5 {
+ desktopfile.files = $${TARGET}.desktop
+ desktopfile.path = /usr/share/applications/hildon
+ icon.files = $${TARGET}64.png
+ icon.path = /usr/share/icons/hicolor/64x64/apps
+ } else {
+ desktopfile.files = $${TARGET}_harmattan.desktop
+ desktopfile.path = /usr/share/applications
+ icon.files = $${TARGET}80.png
+ icon.path = /usr/share/icons/hicolor/80x80/apps
+ copyCommand =
+ for(deploymentfolder, DEPLOYMENTFOLDERS) {
+ source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
+ source = $$replace(source, \\\\, /)
+ macx {
+ target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
+ } else {
+ target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+ }
+ target = $$replace(target, \\\\, /)
+ sourcePathSegments = $$split(source, /)
+ targetFullPath = $$target/$$last(sourcePathSegments)
+ !isEqual(source,$$targetFullPath) {
+ !isEmpty(copyCommand):copyCommand += &&
+ copyCommand += $(MKDIR) \"$$target\"
+ copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
+ }
+ }
+ !isEmpty(copyCommand) {
+ copyCommand = @echo Copying application data... && $$copyCommand
+ copydeploymentfolders.commands = $$copyCommand
+ first.depends = $(first) copydeploymentfolders
+ export(first.depends)
+ export(copydeploymentfolders.commands)
+ QMAKE_EXTRA_TARGETS += first copydeploymentfolders
+ }
+ }
+# installPrefix = /opt/$${TARGET}
+ for(deploymentfolder, DEPLOYMENTFOLDERS) {
+ item = item$${deploymentfolder}
+ itemfiles = $${item}.files
+ $$itemfiles = $$eval($${deploymentfolder}.source)
+ itempath = $${item}.path
+ $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
+ export($$itemfiles)
+ export($$itempath)
+ INSTALLS += $$item
+ }
+ target.path = $${installPrefix}/bin
+ export(icon.files)
+ export(icon.path)
+ export(desktopfile.files)
+ export(desktopfile.path)
+ export(target.path)
+ INSTALLS += desktopfile icon target
+ }
+
+ export (ICON)
+ export (INSTALLS)
+ export (LIBS)
+ export (QMAKE_EXTRA_TARGETS)
}