summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2022-12-14 11:22:04 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-12-14 19:16:15 +0000
commit6875d0eb7db90999d9e2fd0a9bfa05e8e58e5112 (patch)
tree68a244c11555368b84a837517c7f7d0a0b9e288d
parent6c629c0de873948dd65a07d9f5708d510a54a2f9 (diff)
qtopcua: fix simulationserver source lookup
- for Qt major greater than 5, look up the sources in 'Src' folder in the Qt installation - the orginal relative path for MODULE_SOURCES given was also wrong. This is now fixed. Fixes: QTBUG-109096 Change-Id: Iabcf8baaf1a440b863aaf9ead3cfbb63c98d8b02 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9b122a201bc971da5ce5394f59e8c08b74b5ee50) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/opcua/waterpump/simulationserver/CMakeLists.txt5
-rw-r--r--examples/opcua/waterpump/simulationserver/simulationserver.pro7
2 files changed, 9 insertions, 3 deletions
diff --git a/examples/opcua/waterpump/simulationserver/CMakeLists.txt b/examples/opcua/waterpump/simulationserver/CMakeLists.txt
index 8befc71..67419c0 100644
--- a/examples/opcua/waterpump/simulationserver/CMakeLists.txt
+++ b/examples/opcua/waterpump/simulationserver/CMakeLists.txt
@@ -14,9 +14,10 @@ find_package(Qt6 REQUIRED COMPONENTS Core OpcUa)
qt_standard_project_setup()
-if (EXISTS ../../../../../../../${QT_REPO_MODULE_VERSION}/Automation/sources/qtopcua/)
- set(MODULE_SOURCE ../../../../../../../${QT_REPO_MODULE_VERSION}/Automation/sources/qtopcua/)
+if (EXISTS ../../../../../${Qt6_VERSION}/Src/qtopcua/)
+ set(MODULE_SOURCE ../../../../../${Qt6_VERSION}/Src/qtopcua/)
else()
+ # Build from source tree
set(MODULE_SOURCE ../../../../)
endif()
diff --git a/examples/opcua/waterpump/simulationserver/simulationserver.pro b/examples/opcua/waterpump/simulationserver/simulationserver.pro
index 9f89ac7..7a7917c 100644
--- a/examples/opcua/waterpump/simulationserver/simulationserver.pro
+++ b/examples/opcua/waterpump/simulationserver/simulationserver.pro
@@ -4,7 +4,12 @@ QT += opcua opcua-private
QT -= gui
# Installed example package
-MODULE_SOURCES=../../../../../../../$$QT_VERSION/Automation/sources/qtopcua/
+greaterThan(QT_MAJOR_VERSION, 5) {
+ MODULE_SOURCES=../../../../../$$QT_VERSION/Src/qtopcua/
+} else {
+ MODULE_SOURCES=../../../../../$$QT_VERSION/Automation/sources/qtopcua/
+}
+
!exists($$MODULE_SOURCES):{
# Build from source tree
MODULE_SOURCES=$$PWD/../../../../