diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2022-12-14 11:22:04 +0100 |
---|---|---|
committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2022-12-14 16:26:10 +0100 |
commit | 9b122a201bc971da5ce5394f59e8c08b74b5ee50 (patch) | |
tree | a41fccb87f1ba6e5c9ef682c76c132b945180f8d | |
parent | 471f7396494b8a593ad22b42e0bb09c4ecf9ff3c (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
Pick-to: 6.2 6.4 6.5
Change-Id: Iabcf8baaf1a440b863aaf9ead3cfbb63c98d8b02
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | examples/opcua/waterpump/simulationserver/CMakeLists.txt | 5 | ||||
-rw-r--r-- | 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/../../../../ |