opc source code
This commit is contained in:
@@ -27,8 +27,15 @@ if(NOT asio_POPULATED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# open62541
|
||||
# open62541 (vendored: third_party/open62541, tag v1.4.6)
|
||||
if(SOFTBUS_WITH_OPCUA)
|
||||
set(_softbus_open62541_dir "${CMAKE_SOURCE_DIR}/third_party/open62541")
|
||||
if(NOT EXISTS "${_softbus_open62541_dir}/CMakeLists.txt")
|
||||
message(FATAL_ERROR
|
||||
"open62541 vendor tree not found at ${_softbus_open62541_dir}. "
|
||||
"Expected third_party/open62541 (v1.4.6).")
|
||||
endif()
|
||||
|
||||
set(UA_ENABLE_AMALGAMATION OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(MINGW)
|
||||
@@ -47,13 +54,10 @@ if(SOFTBUS_WITH_OPCUA)
|
||||
set(UA_BUILD_UNIT_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(UA_ENABLE_ENCRYPTION OFF CACHE BOOL "" FORCE)
|
||||
|
||||
FetchContent_Declare(
|
||||
open62541
|
||||
GIT_REPOSITORY https://github.com/open62541/open62541.git
|
||||
GIT_TAG v1.4.6
|
||||
GIT_SHALLOW TRUE
|
||||
add_subdirectory(
|
||||
"${_softbus_open62541_dir}"
|
||||
"${CMAKE_BINARY_DIR}/third_party/open62541"
|
||||
)
|
||||
FetchContent_MakeAvailable(open62541)
|
||||
set(BUILD_SHARED_LIBS ${_softbus_saved_build_shared} CACHE BOOL "" FORCE)
|
||||
|
||||
if(MINGW AND TARGET open62541)
|
||||
|
||||
Reference in New Issue
Block a user