diff options
author | Sarah Smith <sarah.j.smith@nokia.com> | 2011-12-21 14:45:00 +1000 |
---|---|---|
committer | Sarah Jane Smith <sarah.j.smith@nokia.com> | 2011-12-21 08:57:36 +0100 |
commit | aedf27c0aa3e3d037392335ea96d37e3a9a8b811 (patch) | |
tree | fec10b3fff19f2cb6e0d3640d73a4ebb7a1fe804 /pkg.pri | |
parent | a7db0a7405e3511ef8a78f0ff1cdb3b1ecd92157 (diff) |
Make Qt3D buildable without widgets or opengl.
Pull out all references to QGLContext, and QGLWidget and so on; and
replace with the equivalent from the gui library. Where there is no
equivalent, eg the BindOptions enum, then reimplement.
Also get rid of the harmattan and symbian packaging goop. This had
become completely unmaintainable, and was making it very hard to see
what dependencies were being pull in by the various parts of the build
system. In order to have any confidence that conditional compilation
would not add in some problematic dependency, clean all this up.
Task-number: QTBUG-23299
Change-Id: Ied92ca1397076986e455674b064d8540bb13c0df
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to 'pkg.pri')
-rw-r--r-- | pkg.pri | 299 |
1 files changed, 47 insertions, 252 deletions
@@ -1,275 +1,70 @@ -# 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 - -qtc_harmattan { - CONFIG += maemo - CONFIG += package - QMAKE_CXXFLAGS += -Wno-psabi - # The Qt SDK / Qt Creator harmattan integration needs some special treatment - QT3D_INSTALL_BINS = /bin - QT3D_INSTALL_LIBS = /usr/lib - QT3D_INSTALL_PLUGINS = /usr/lib/qt4/plugins - QT3D_INSTALL_IMPORTS = /usr/lib/qt4/imports - QT3D_INSTALL_DATA = /usr/share/qt4 -} else { - QT3D_INSTALL_BINS = $$[QT_INSTALL_BINS] - QT3D_INSTALL_LIBS = $$[QT_INSTALL_LIBS] - QT3D_INSTALL_PLUGINS = $$[QT_INSTALL_PLUGINS] - QT3D_INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS] - QT3D_INSTALL_DATA = $$[QT_INSTALL_DATA] +mt { + desktopfile.files = $${TARGET}.qmlproject info.json + desktopfile.path = /opt/mt/applications/$$TARGET + icon.files = $$ICON_FILE + icon.path = /opt/mt/applications/$$TARGET + INSTALLS += desktopfile icon } -qt3dquick_deploy_pkg { - CONFIG += qt3d_deploy_pkg +!package: DESTDIR = ../../../bin +!isEmpty(QML_INFRA_FILES) { + # rules to copy files from the *base level* of $$PWD/qml into the right place package { - macx:CONFIG(qt_framework, qt_framework|qt_no_framework) { - LIBS += -framework Qt3DQuick -F../../../src/quick3d - INCLUDEPATH += ../../../src/quick3d/Qt3DQuick.framework/Versions/1/Headers + copyqmlinfra_install.files = $$QML_INFRA_FILES + mt { + copyqmlwrap.files = mt.qml + copyqmlwrap.path = /opt/mt/applications/$$TARGET + INSTALLS += copyqmlwrap + copyqmlinfra_install.path = /opt/mt/applications/$$TARGET/qml } else { - win32 { - CONFIG(debug, debug|release) { - TARGET = $$member(TARGET, 0)d - LIBS += ..\\..\\..\\src\\quick3d\\debug\\Qt3DQuickd.lib - } else { - LIBS += ..\\..\\..\\src\\quick3d\\release\\Qt3DQuick.lib - } + macx { + copyqmlinfra_install.path = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml } else { - LIBS += -L../../../src/quick3d -lQt3DQuick + copyqmlinfra_install.path = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml } - INCLUDEPATH += ../../../include/Qt3DQuick } - QT += declarative quick opengl - - maemo: icons.files = icon-l-qtquick3d.png + INSTALLS += copyqmlinfra_install } else { - CONFIG += qt3dquick - } -} - -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 + macx { + target_dir = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml } 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 + target_dir = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml } - QT += opengl - - !qt3dquick_deploy_pkg: maemo: icons.files = icon-l-qt3d.png - } else { - CONFIG += qt3d + copyqmlinfra.input = QML_INFRA_FILES + copyqmlinfra.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} + copyqmlinfra.commands = $(MKDIR) $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + copyqmlinfra.CONFIG += no_link_no_clean + copyqmlinfra.variable_out = POST_TARGETDEPS + QMAKE_EXTRA_COMPILERS += copyqmlinfra } } -contains(TEMPLATE, app) { - package { - maemo { - applnk.files = $${TARGET}.desktop - applnk.path = /usr/share/applications - - # 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 - - app_target.path = $$QT3D_INSTALL_BINS - INSTALLS += app_target +!isEmpty(QML_MESHES_FILES) { + # rules to copy files from the *base level* of $$PWD/qml/meshes into the right place + package { + copyqmlmeshes_install.files = $$QML_MESHES_FILES + mt { + copyqmlmeshes_install.path = /opt/mt/applications/$$TARGET/qml/meshes } else { - mt { - applnk.files = info.json $${TARGET}.qmlproject - 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 - app_target.path = /opt/mt/applications/$${TARGET} - INSTALLS += app_target - - DEFINES += QT3D_USE_OPT=$${TARGET} + macx { + copyqmlmeshes_install.path = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml/meshes } else { - app_target.path = $$QT3D_INSTALL_BINS - INSTALLS += app_target + copyqmlmeshes_install.path = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml/meshes } } + INSTALLS += copyqmlmeshes_install } else { - DESTDIR = ../../../bin - } -} - -qt3d_deploy_qml { - mt { - package { - TARGET_DIR = $$PWD - } else { - TARGET_DIR = /opt/mt/applications/$$TARGET - } - } else { - TARGET_DIR = $$[QT_INSTALL_DATA]/quick3d/resources/examples/$$TARGET - } - symbian { - TARGET_DIR = . - } else: macx { - TARGET_DIR = . - } else { - !package { - TARGET_DIR = ../../../bin/resources/examples/$$TARGET - } - } - for(dir, INSTALL_DIRS) { - di.source = $${dir} - di.target = $$TARGET_DIR - DEPLOYMENTFOLDERS += di - } - for(file, INSTALL_FILES) { - fi.source = $${file} - fi.target = $$TARGET_DIR - DEPLOYMENTFOLDERS += fi - } -} - -# 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 = - !package { - 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 += $$QMAKE_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) { - message(copyCommand - $$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 - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - } 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 + macx { + target_dir = $$DESTDIR/$${TARGET}.app/Contents/Resources/qml/meshes } 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 = $$DESTDIR/$${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) -v \"$$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 - } + target_dir = $$DESTDIR/resources/$$CATEGORY/$${TARGET}/qml/meshes } - mt { - desktopfile.files = $${TARGET}.qmlproject info.json - desktopfile.path = /opt/mt/applications/$$TARGET - icon.files = ../icon.png - icon.path = /opt/mt/applications/$$TARGET - - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = /opt/mt/applications/$$TARGET - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - target.path = /opt/mt/applications/$$TARGET - } else { - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $$[QT_INSTALL_PREFIX]/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - target.path = $$[QT_INSTALL_BINS] - } - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target + copyqmlmeshes.input = QML_MESHES_FILES + copyqmlmeshes.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} + copyqmlmeshes.commands = $(MKDIR) $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + copyqmlmeshes.CONFIG += no_link_no_cle:qan + copyqmlmeshes.variable_out = POST_TARGETDEPS + QMAKE_EXTRA_COMPILERS += copyqmlmeshes } - - export (ICON) - export (INSTALLS) - export (LIBS) - export (QMAKE_EXTRA_TARGETS) } |