mirror of
https://github.com/open62541/open62541.git
synced 2026-10-16 20:33:18 +08:00
Move the generation of src_generated/nodeset.c to examples/CMakeLists.txt
This commit is contained in:
committed by
Julius Pfrommer
parent
8c7e7ea237
commit
ab0b222965
@@ -365,23 +365,6 @@ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/open62541.c
|
||||
ADD_CUSTOM_TARGET(open625451_amalgamation DEPENDS ${PROJECT_BINARY_DIR}/open62541.h
|
||||
${PROJECT_BINARY_DIR}/open62541.c)
|
||||
|
||||
# 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)
|
||||
|
||||
#####################
|
||||
# Build the Library #
|
||||
#####################
|
||||
@@ -445,11 +428,6 @@ if(UA_BUILD_UNIT_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
if(UA_BUILD_EXAMPLES_NODESET_COMPILER)
|
||||
add_custom_target(generate_informationmodel ALL
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/src_generated/nodeset.h ${PROJECT_BINARY_DIR}/src_generated/nodeset.c)
|
||||
endif()
|
||||
|
||||
############################
|
||||
# Linting run (clang-tidy) #
|
||||
############################
|
||||
|
||||
@@ -68,6 +68,23 @@ add_executable(server_inheritance server_inheritance.c)
|
||||
target_link_libraries(server_inheritance open62541 ${open62541_LIBRARIES})
|
||||
|
||||
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_executable(server_nodeset server_nodeset.c ${PROJECT_BINARY_DIR}/src_generated/nodeset.c)
|
||||
target_link_libraries(server_nodeset open62541 ${open62541_LIBRARIES})
|
||||
|
||||
Reference in New Issue
Block a user