summaryrefslogtreecommitdiffstats
path: root/demo/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-19 05:13:42 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-19 05:38:24 +0100
commita0c7f2a7ef04dbe2e7491eabf828e26423d1bd10 (patch)
tree50491c80f28ad5f2789a3777bec74489327c4d7f /demo/CMakeLists.txt
parent23916cbb98e952aab752a647ac96020aab709bb6 (diff)
downloadBobinkQtOpcUa-a0c7f2a7ef04dbe2e7491eabf828e26423d1bd10.tar.gz
BobinkQtOpcUa-a0c7f2a7ef04dbe2e7491eabf828e26423d1bd10.zip
Rename targets, route messages to debug console, clean up
- Rename CMake project and library target to BobinkQtOpcUa (URI stays Bobink) - Rename demo target to BobinkDemo, output binary to build/bin/ - Route all QML status/error messages to the in-app debug console - Remove discoveryInterval QML property, default to 30s internally - Add errorChanged handler, PKI file validation in applyPki()
Diffstat (limited to 'demo/CMakeLists.txt')
-rw-r--r--demo/CMakeLists.txt30
1 files changed, 16 insertions, 14 deletions
diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt
index a12e090..9fb3093 100644
--- a/demo/CMakeLists.txt
+++ b/demo/CMakeLists.txt
@@ -1,18 +1,20 @@
-qt_add_executable(bobink-demo main.cpp)
+qt_add_executable(BobinkDemo main.cpp)
-qt_add_qml_module(bobink-demo
- URI BobinkDemo
- VERSION 1.0
- QML_FILES
- Main.qml
- # LoginPage.qml
- # NodePage.qml
- NO_RESOURCE_TARGET_PATH
-)
+qt_add_qml_module(
+ BobinkDemo
+ URI
+ BobinkDemo
+ VERSION
+ 1.0
+ QML_FILES
+ Main.qml)
-target_link_libraries(bobink-demo PRIVATE Qt6::Quick bobink)
+# Executable goes to bin/ to avoid clashing with the QML module directory
+set_target_properties(BobinkDemo PROPERTIES RUNTIME_OUTPUT_DIRECTORY
+ "${CMAKE_BINARY_DIR}/bin")
+
+target_link_libraries(BobinkDemo PRIVATE Qt6::Quick BobinkQtOpcUa)
# Tell the demo where to find the locally-built OpcUa plugin at runtime
-target_compile_definitions(bobink-demo PRIVATE
- QTOPCUA_PLUGIN_PATH="${QTOPCUA_BUILD_DIR}/plugins"
-)
+target_compile_definitions(
+ BobinkDemo PRIVATE QTOPCUA_PLUGIN_PATH="${QTOPCUA_BUILD_DIR}/plugins")