|
@@ -65,10 +65,27 @@ add_example(server_repeated_job server_repeated_job.c)
|
|
|
|
|
|
add_example(server_inheritance server_inheritance.c)
|
|
|
|
|
|
-if(NOT BUILD_SHARED_LIBS AND UA_BUILD_EXAMPLES_NODESET_COMPILER)
|
|
|
- # needs internal methods which are not exported in the dynamic lib
|
|
|
- add_example(server_nodeset "server_nodeset.c ${PROJECT_BINARY_DIR}/src_generated/nodeset.c")
|
|
|
- target_include_directories(server_nodeset PRIVATE ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/deps) # needs an internal header
|
|
|
+if(NOT BUILD_SHARED_open62541_LIBRARIES AND UA_BUILD_EXAMPLES_NODESET_COMPILER)
|
|
|
+ # example information model from nodeset xml
|
|
|
+ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/nodeset.h ${PROJECT_BINARY_DIR}/src_generated/nodeset.c
|
|
|
+ PRE_BUILD
|
|
|
+ COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py
|
|
|
+ -i ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt
|
|
|
+ ${PROJECT_SOURCE_DIR}/tools/schema/namespace0/Opc.Ua.NodeSet2.xml
|
|
|
+ ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml
|
|
|
+ ${PROJECT_BINARY_DIR}/src_generated/nodeset
|
|
|
+ DEPENDS ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py
|
|
|
+ ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/open62541_MacroHelper.py
|
|
|
+ ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_builtin_types.py
|
|
|
+ ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_constants.py
|
|
|
+ ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_namespace.py
|
|
|
+ ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_node_types.py
|
|
|
+ ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt
|
|
|
+ ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml)
|
|
|
+
|
|
|
+ # needs internal methods which are not exported in the dynamic lib
|
|
|
+ add_example(server_nodeset server_nodeset.c ${PROJECT_BINARY_DIR}/src_generated/nodeset.c)
|
|
|
+ target_include_directories(server_nodeset PRIVATE ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/deps) # needs an internal header
|
|
|
endif()
|
|
|
|
|
|
if(UA_BUILD_SELFSIGNED_CERTIFICATE)
|