From 9b122a201bc971da5ce5394f59e8c08b74b5ee50 Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Wed, 14 Dec 2022 11:22:04 +0100 Subject: 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 Pick-to: 6.2 6.4 6.5 Change-Id: Iabcf8baaf1a440b863aaf9ead3cfbb63c98d8b02 Reviewed-by: Alexandru Croitor --- examples/opcua/waterpump/simulationserver/CMakeLists.txt | 5 +++-- examples/opcua/waterpump/simulationserver/simulationserver.pro | 7 ++++++- 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/../../../../ -- cgit v1.2.3