diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-23 20:38:41 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-28 03:14:24 +0200 |
commit | bb6251a7a0e1ff7d0c628a6e3420bf7bac59cfdb (patch) | |
tree | 51b1860a3703c1478e7bc8edc7b16b08ec720934 /pkg.pri | |
parent | a4628855ee95ef359e3ea66fcdb47dc03f14a9c4 (diff) |
revamp the build/install targets of auxilliary files
files will now always be copied to the build dir, and install targets
will be created always as well.
Change-Id: I42a57d7fb6536ec3e5ade088f02872484891507e
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to 'pkg.pri')
-rw-r--r-- | pkg.pri | 100 |
1 files changed, 33 insertions, 67 deletions
@@ -3,26 +3,16 @@ # qmlres.cpp. Once Qt5 is stable and deployment is clear this will be # removed. Also check the README file. -package { - # default install path for packaging qml resources - package case - resource_dir = $$[QT_INSTALL_DATA]/qt3d/resources/$$CATEGORY/$${TARGET} -} else { - # if we're not packaging, build all our demos/examples/etc and supporting files - # into $BUILD_DIR/bin - DESTDIR = ../../../bin +# package the binary wrapper that launches the QML +target.path = $$[QT_INSTALL_DATA]/qt3d +INSTALLS += target - # default install path for packaging qml resources - developer case - resource_dir = $$DESTDIR/resources/$$CATEGORY/$${TARGET} -} +macx: \ + resource_dir = $${TARGET}.app/Contents/Resources +else: \ + resource_dir = resources/$$CATEGORY/$${TARGET} -# package the binary wrapper that launches the QML -package { - macx: resource_dir = $$[QT_INSTALL_DATA]/qt3d/$${TARGET}.app/Contents/Resources - target.path = $$[QT_INSTALL_DATA]/qt3d - INSTALLS += target -} else { - macx: resource_dir = $$DESTDIR/$${TARGET}.app/Contents/Resources -} +DESTDIR = $$shadowed($$PWD)/bin # The QML_INFRA_FILES and QML_MESHES_FILES are both about QML based # applications, so we'll install them into QT_INSTALL_DATA instead of @@ -38,57 +28,33 @@ package { !isEmpty(QML_INFRA_FILES) { # rules to copy files from the *base level* of $$PWD/qml into the right place - package { - copyqmlinfra_install.files = $$QML_INFRA_FILES - copyqmlinfra_install.path = $$resource_dir/qml - INSTALLS += copyqmlinfra_install - } else { - # if we're not packaging, put all our demos/examples and supporting files - # into $BUILD_DIR/bin - target_dir = $$resource_dir/qml - target_dir ~= s,/,$$QMAKE_DIR_SEP, - # create extra qmake compiler to copy files across during build step - copyqmlinfra.input = QML_INFRA_FILES - copyqmlinfra.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} - !win32|if(win32-g++:!isEmpty(QMAKE_SH)) { - # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work - copyqmlinfra.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - } else { - # If we are in windows, and not a mingw shell, then the mkdir binary does not handle - # the -p switch, and will fail if the directory already exists, so make it subject to - # an "exists" test. The parens are necessary otherwise the copy won't occur when the - # test fails, since $$QMAKE_CHK_DIR_EXISTS is "IF NOT EXISTS" - copyqmlinfra.commands = ($$QMAKE_CHK_DIR_EXISTS $$target_dir $$QMAKE_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 - } + copyqmlinfra_install.files = $$QML_INFRA_FILES + copyqmlinfra_install.path = $$target.path/$$resource_dir/qml + INSTALLS += copyqmlinfra_install + + # put all our demos/examples and supporting files into $BUILD_DIR/bin + target_dir = $$DESTDIR/$$resource_dir/qml + # create extra qmake compiler to copy files across during build step + copyqmlinfra.input = QML_INFRA_FILES + copyqmlinfra.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} + copyqmlinfra.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + copyqmlinfra.CONFIG += no_link no_clean + copyqmlinfra.variable_out = POST_TARGETDEPS + QMAKE_EXTRA_COMPILERS += copyqmlinfra } !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 - copyqmlmeshes_install.path = $$resource_dir/qml/meshes - INSTALLS += copyqmlmeshes_install - } else { - target_dir = $$resource_dir/qml/meshes - target_dir ~= s,/,$$QMAKE_DIR_SEP, - copyqmlmeshes.input = QML_MESHES_FILES - copyqmlmeshes.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} - !win32|if(win32-g++:!isEmpty(QMAKE_SH)) { - # in mac, linux, and windows-with-mingw $$QMAKE_MKDIR has -p so this will always work - copyqmlmeshes.commands = $$QMAKE_MKDIR $$target_dir && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - } else { - # If we are in windows, and not a mingw shell, then the mkdir binary does not handle - # the -p switch, and will fail if the directory already exists, so make it subject to - # an "exists" test. The parens are necessary otherwise the copy won't occur when the - # test fails, since $$QMAKE_CHK_DIR_EXISTS is "IF NOT EXISTS" - copyqmlmeshes.commands = ($$QMAKE_CHK_DIR_EXISTS $$target_dir $$QMAKE_MKDIR $$target_dir) && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - } - copyqmlmeshes.CONFIG += no_link_no_clean - copyqmlmeshes.variable_out = POST_TARGETDEPS - QMAKE_EXTRA_COMPILERS += copyqmlmeshes - } + copyqmlmeshes_install.files = $$QML_MESHES_FILES + copyqmlmeshes_install.path = $$target.path/$$resource_dir/qml/meshes + INSTALLS += copyqmlmeshes_install + + target_dir = $$DESTDIR/$$resource_dir/qml/meshes + copyqmlmeshes.input = QML_MESHES_FILES + copyqmlmeshes.output = $$target_dir/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} + copyqmlmeshes.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + copyqmlmeshes.CONFIG += no_link no_clean + copyqmlmeshes.variable_out = POST_TARGETDEPS + QMAKE_EXTRA_COMPILERS += copyqmlmeshes } |