diff options
-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/../../../../ |