summaryrefslogtreecommitdiff
path: root/examples/sensors/grue/import/import.pro
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2013-08-13 14:40:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-14 21:03:53 +0200
commit52c831db165f5068826dddef4d41427a98a42dfd (patch)
tree6d79c1c09ca5894fc3beb3f9627047f9cff6e435 /examples/sensors/grue/import/import.pro
parent6dd954f2b9ce1f241d968d201183f8a80d729e57 (diff)
downloadqtsensors-52c831db165f5068826dddef4d41427a98a42dfd.tar.gz
Doc: Update Grue Sensor example
Fix a number of issues with the example: - Add \omit to generated doc sections, we don't want qdoc to process these (not part of Qt docs) - Combine the 5 separate examples into a single \example and discuss each subproject in a subsection - Add example image to doc - Fix deployment/build target directories and import paths - Define a 'reading' property for the sensor to make it work on QtSensors 5.1 - Fix the Grue QML application to avoid flicker from frequent updates. Task-number: QTBUG-32881 Change-Id: I2785faead1baaf5b1ae9d05df3398e018e945418 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Diffstat (limited to 'examples/sensors/grue/import/import.pro')
-rw-r--r--examples/sensors/grue/import/import.pro19
1 files changed, 15 insertions, 4 deletions
diff --git a/examples/sensors/grue/import/import.pro b/examples/sensors/grue/import/import.pro
index 71e2249..56623da 100644
--- a/examples/sensors/grue/import/import.pro
+++ b/examples/sensors/grue/import/import.pro
@@ -2,12 +2,12 @@ TEMPLATE = lib
CONFIG += plugin
TARGET = $$qtLibraryTarget(declarative_grue)
-TARGETPATH = Grue
+DESTDIR = ../Grue
QT = core gui qml sensors
INCLUDEPATH += $$PWD/../lib
-LIBS += -L$$OUT_PWD/../lib -lgruesensor
+LIBS += -L$$OUT_PWD/.. -lgruesensor
# Shared gruesensor library will be installed in parent directory.
# Define rpath so that this plugin will know where to look for it.
@@ -15,15 +15,26 @@ unix:!mac: QMAKE_LFLAGS += -Wl,-rpath,\\\$\$ORIGIN/..
SOURCES = main.cpp
-DESTPATH=$$[QT_INSTALL_EXAMPLES]/qtsensors/grue/Grue
+DESTPATH=$$[QT_INSTALL_EXAMPLES]/sensors/grue/Grue
target.path=$$DESTPATH
INSTALLS += target
qmldir.files=$$PWD/qmldir
-qmldir.path=$$DESTPATH
+qmldir.path=$$DESTDIR
INSTALLS += qmldir
OTHER_FILES += \
plugin.json qmldir
+copyfile = $$PWD/qmldir
+copydest = $$DESTDIR
+
+# On Windows, use backslashes as directory separators
+win32: {
+ copyfile ~= s,/,\\,g
+ copydest ~= s,/,\\,g
+}
+
+# Copy the qmldir file to the same folder as the plugin binary
+QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$copyfile) $$quote($$copydest) $$escape_expand(\\n\\t)