summaryrefslogtreecommitdiffstats
path: root/cmake/BuildDeps.cmake
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-18 00:18:33 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-18 00:18:33 +0100
commit1a79ab468d8cc23cfdf28ddfa85d3e03ffddf44c (patch)
treee19d73f0aa00958dc65d19cb2dfc607f2469089b /cmake/BuildDeps.cmake
parent343169dff6b062074fd3c4a5e240b449ffc4a449 (diff)
downloadBobinkQtOpcUa-1a79ab468d8cc23cfdf28ddfa85d3e03ffddf44c.tar.gz
BobinkQtOpcUa-1a79ab468d8cc23cfdf28ddfa85d3e03ffddf44c.zip
Refactor and document: fix cert filenames, add Doxygen, improve demo
Refactoring (issues 1,3,4,5,7,8,9,10 from review): - Replace hardcoded cert filenames with certFile/keyFile properties - Add 30s timeout to certificate trust QEventLoop - Cache servers() QVariantList instead of rebuilding per call - Validate URLs before passing to QtOpcUa - Use ComboBox valueRole for robust enum mapping - Add certificate trust dialog to demo - Remove unnecessary RowLayout wrapper - Remove debug output from BuildDeps.cmake Documentation: - Add Doxygen file blocks to all C++ files - Document AuthMode enum, toAuthenticationInformation(), key Q_INVOKABLE methods, certificateTrustRequested signal contract - Convert section banners to standard format - Add file/target comments to CMake and QML files
Diffstat (limited to 'cmake/BuildDeps.cmake')
-rw-r--r--cmake/BuildDeps.cmake20
1 files changed, 17 insertions, 3 deletions
diff --git a/cmake/BuildDeps.cmake b/cmake/BuildDeps.cmake
index 8a1fa89..d105419 100644
--- a/cmake/BuildDeps.cmake
+++ b/cmake/BuildDeps.cmake
@@ -1,3 +1,13 @@
+# ======================================
+# BuildDeps.cmake
+#
+# Configure, build, and install open62541 and QtOpcUa from
+# git submodules under deps/.
+#
+# Skip detection: if the built .so already exists, the
+# corresponding dep is skipped. Delete the file to rebuild.
+# ======================================
+
set(OPEN62541_SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/open62541")
set(OPEN62541_BUILD_DIR "${CMAKE_BINARY_DIR}/deps/open62541-build")
set(OPEN62541_INSTALL_DIR "${CMAKE_BINARY_DIR}/deps/open62541-install")
@@ -18,7 +28,9 @@ if(NOT EXISTS "${QTOPCUA_SOURCE_DIR}/CMakeLists.txt")
)
endif()
-# --- open62541 ---
+# ======================================
+# open62541
+# ======================================
if(NOT EXISTS "${OPEN62541_INSTALL_DIR}/lib/libopen62541.so")
message(STATUS "Configuring open62541 in ${OPEN62541_BUILD_DIR}...")
@@ -60,9 +72,10 @@ else()
message(STATUS "open62541 already built, skipping")
endif()
-# --- qtopcua ---
+# ======================================
+# QtOpcUa
+# ======================================
-message(STATUS "CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}")
find_program(QT_CMAKE_COMMAND bin/qt-cmake REQUIRED)
if(NOT EXISTS "${QTOPCUA_BUILD_DIR}/lib/libQt6OpcUa.so")
@@ -76,6 +89,7 @@ if(NOT EXISTS "${QTOPCUA_BUILD_DIR}/lib/libQt6OpcUa.so")
"${QTOPCUA_BUILD_DIR}"
-G
Ninja
+ # Use our locally-built open62541, not the bundled copy
-DINPUT_open62541=system
-DCMAKE_PREFIX_PATH=${OPEN62541_INSTALL_DIR})
execute_process(COMMAND ${_cmd} RESULT_VARIABLE _result)