Skip to content

Commit

Permalink
Merge 6b61ed8 into 3b14df8
Browse files Browse the repository at this point in the history
  • Loading branch information
opcua-tsn-team-kalycito committed Jun 18, 2019
2 parents 3b14df8 + 6b61ed8 commit a3ebafa
Show file tree
Hide file tree
Showing 18 changed files with 4,923 additions and 9 deletions.
38 changes: 32 additions & 6 deletions CMakeLists.txt
Expand Up @@ -213,7 +213,7 @@ mark_as_advanced(UA_ENABLE_PUBSUB_ETH_UADP)
if(UA_ENABLE_PUBSUB_ETH_UADP)
if (NOT CMAKE_SYSTEM MATCHES "Linux")
message(FATAL_ERROR "UADP over Ethernet is only available on Linux.")
endif()
endif()
endif()

option(UA_ENABLE_PUBSUB_DELTAFRAMES "Enable sending of delta frames with only the changes" OFF)
Expand Down Expand Up @@ -249,6 +249,18 @@ endif()
option(UA_ENABLE_JSON_ENCODING "Enable Json encoding (EXPERIMENTAL)" OFF)
mark_as_advanced(UA_ENABLE_JSON_ENCODING)

option(UA_ENABLE_PUBSUB_MQTT "Enable publish/subscribe with mqtt (experimental)" OFF)
mark_as_advanced(UA_ENABLE_PUBSUB_MQTT)
if(UA_ENABLE_PUBSUB_MQTT)
# Warn if run in Windows
if(WIN32)
MESSAGE(WARNING "Multithreading is enabled in MQTT plugin. This feature is under development and marked as EXPERIMENTAL")
endif()
if(NOT UA_ENABLE_PUBSUB)
message(FATAL_ERROR "Mqtt cannot be used with disabled PubSub function.")
endif()
endif()

option(UA_ENABLE_STATUSCODE_DESCRIPTIONS "Enable conversion of StatusCode to human-readable error message" ON)
mark_as_advanced(UA_ENABLE_STATUSCODE_DESCRIPTIONS)

Expand Down Expand Up @@ -707,6 +719,20 @@ if(UA_ENABLE_PUBSUB)
list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_ethernet.h)
list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_ethernet.c)
endif()
if(UA_ENABLE_PUBSUB_MQTT)
if(WIN32)
MESSAGE(WARNING "Multithreading is enabled in MQTT plugin. This feature is under development and marked as EXPERIMENTAL")
else()
list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/deps/mqtt-c/mqtt_pal.h)
list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/mqtt/ua_mqtt_pal.c)
list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/deps/mqtt-c/mqtt.h)
list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/deps/mqtt-c/mqtt.c)
list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/ua_network_pubsub_mqtt.h)
list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_network_pubsub_mqtt.c)
list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/mqtt/ua_mqtt_adapter.h)
list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/mqtt/ua_mqtt_adapter.c)
endif()
endif()
endif()

if(UA_ENABLE_JSON_ENCODING)
Expand Down Expand Up @@ -829,8 +855,8 @@ else()
list(APPEND UA_FILE_NODESETS ${PROJECT_SOURCE_DIR}/tools/schema/Opc.Ua.NodeSet2.PubSubMinimal.xml)
endif()
endif()
if(UA_ENABLE_DA)
list(APPEND UA_FILE_DATATYPES ${PROJECT_SOURCE_DIR}/tools/schema/datatypes_dataaccess.txt)
if(UA_ENABLE_DA)
list(APPEND UA_FILE_DATATYPES ${PROJECT_SOURCE_DIR}/tools/schema/datatypes_dataaccess.txt)
endif()
endif()

Expand Down Expand Up @@ -1212,8 +1238,8 @@ set(UA_install_tools_files "tools/generate_datatypes.py"
"tools/generate_nodeid_header.py"
"tools/generate_statuscode_descriptions.py")

install(DIRECTORY ${UA_install_tools_dirs}
DESTINATION ${open62541_install_tools_dir}
install(DIRECTORY ${UA_install_tools_dirs}
DESTINATION ${open62541_install_tools_dir}
USE_SOURCE_PERMISSIONS
FILES_MATCHING
PATTERN "*"
Expand Down Expand Up @@ -1250,7 +1276,7 @@ if(NOT UA_ENABLE_AMALGAMATION)
endforeach()

else()
# Export amalgamated header open62541.h which is generated due to build of
# Export amalgamated header open62541.h which is generated due to build of
# open62541-object
install(FILES ${PROJECT_BINARY_DIR}/open62541.h DESTINATION include)
endif()
Expand Down

0 comments on commit a3ebafa

Please sign in to comment.