构建Qt OPC UA Open62541 插件

Open62541 插件默认基于随附的第三方源代码构建,不依赖任何外部组件。open62541 库使用 OpenSSL 提供安全支持。若在配置过程中检测到 OpenSSL 库,则测试及 open62541 后端将启用安全功能。Qt OPC UA 随附的 Open62541 源代码和头文件是使用以下命令,基于 open62541 v1.5.7 版本生成的:

cmake -DUA_ENABLE_AMALGAMATION=ON -DUA_MULTITHREADING=0 -DUA_ARCHITECTURE=none /path/to/open62541-source
make

如果您想构建 open62541 插件的自定义版本,则需要已安装的、使用默认选项构建的 open62541 v1.5.7。要启用加密支持,必须使用以下参数配置 open62541 的构建:

cmake -DUA_ENABLE_ENCRYPTION=OPENSSL /path/to/open62541-source

在使用自定义 open62541 安装进行构建时,必须向 cmake 传递以下选项。

-DINPUT_open62541=system -DCMAKE_PREFIX_PATH=/path/to/open62541-install-dir

仅当 open62541 安装在 cmake 默认不会检查的位置时,才需要使用 `CMAKE_PREFIX_PATH `。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.