summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRainer Keller <Rainer.Keller@qt.io>2018-12-14 09:17:17 +0100
committerRainer Keller <Rainer.Keller@qt.io>2019-02-25 12:14:04 +0000
commit9786d4e04e11287d45ae57eee687d466c40c7ca1 (patch)
treeff3268a1cb33cd9e23a6310c55491b023a6092e9 /examples
parentfdf0a09367450ee387c339fac04cc894821c8c4f (diff)
example: Buildable simulation server from source tree and installer
The simulation server need to be buildable from the example package from the installer as well. Change-Id: I06d303d9d9cfce084e7721721f9be931ac566359 Fixes: QTBUG-72495 Reviewed-by: Jannis Völker <jannis.voelker@basyskom.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/opcua/waterpump/simulationserver/simulationserver.pro21
1 files changed, 12 insertions, 9 deletions
diff --git a/examples/opcua/waterpump/simulationserver/simulationserver.pro b/examples/opcua/waterpump/simulationserver/simulationserver.pro
index f644c2d..5580daa 100644
--- a/examples/opcua/waterpump/simulationserver/simulationserver.pro
+++ b/examples/opcua/waterpump/simulationserver/simulationserver.pro
@@ -1,24 +1,27 @@
TEMPLATE = app
+CONFIG += c++11 console
+QT += opcua opcua-private
-INCLUDEPATH += \
- $$PWD/../../../../src/plugins/opcua/open62541
+# Installed example package
+MODULE_SOURCES=../../../../../../../$$QT_VERSION/Automation/sources/qtopcua/
+!exists($$MODULE_SOURCES):{
+ # Build from source tree
+ MODULE_SOURCES=$$PWD/../../../../
+}
+INCLUDEPATH += $$MODULE_SOURCES/src/plugins/opcua/open62541
DEPENDPATH += INCLUDEPATH
-CONFIG += c++11 console
-
-QT += opcua opcua-private
-
qtConfig(open62541):!qtConfig(system-open62541) {
- include($$PWD/../../../../src/3rdparty/open62541.pri)
+ include($$MODULE_SOURCES/src/3rdparty/open62541.pri)
} else {
QMAKE_USE_PRIVATE += open62541
}
SOURCES += main.cpp \
simulationserver.cpp \
- $$PWD/../../../../src/plugins/opcua/open62541/qopen62541utils.cpp \
- $$PWD/../../../../src/plugins/opcua/open62541/qopen62541valueconverter.cpp
+ $$MODULE_SOURCES/src/plugins/opcua/open62541/qopen62541utils.cpp \
+ $$MODULE_SOURCES/src/plugins/opcua/open62541/qopen62541valueconverter.cpp
HEADERS += \
simulationserver.h