summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to '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)