Skip to content

Commit

Permalink
Merge ffb178c into 5954bd7
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro committed Feb 25, 2019
2 parents 5954bd7 + ffb178c commit 6f7fef3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/cmake/macros_public.cmake
Expand Up @@ -43,6 +43,11 @@ function(ua_generate_nodeid_header)
add_custom_target(${UA_GEN_ID_TARGET_PREFIX}-${UA_GEN_ID_TARGET_SUFFIX} DEPENDS
${UA_GEN_ID_OUTPUT_DIR}/${UA_GEN_ID_NAME}.h
)

# Make sure that the output directory exists
if(NOT EXISTS ${UA_GEN_ID_OUTPUT_DIR})
file(MAKE_DIRECTORY ${UA_GEN_ID_OUTPUT_DIR})
endif()

# Header containing defines for all NodeIds
add_custom_command(OUTPUT ${UA_GEN_ID_OUTPUT_DIR}/${UA_GEN_ID_NAME}.h
Expand Down Expand Up @@ -148,6 +153,11 @@ function(ua_generate_datatypes)
foreach(f ${UA_GEN_DT_FILES_BSD})
set(BSD_FILES_TMP ${BSD_FILES_TMP} "--type-bsd=${f}")
endforeach()

# Make sure that the output directory exists
if(NOT EXISTS ${UA_GEN_DT_OUTPUT_DIR})
file(MAKE_DIRECTORY ${UA_GEN_DT_OUTPUT_DIR})
endif()

add_custom_command(OUTPUT ${UA_GEN_DT_OUTPUT_DIR}/${UA_GEN_DT_NAME}_generated.c
${UA_GEN_DT_OUTPUT_DIR}/${UA_GEN_DT_NAME}_generated.h
Expand Down Expand Up @@ -293,6 +303,11 @@ function(ua_generate_nodeset)
foreach(f ${UA_GEN_NS_FILE})
set(FILE_LIST ${FILE_LIST} "--xml=${f}")
endforeach()

# Make sure that the output directory exists
if(NOT EXISTS ${UA_GEN_NS_OUTPUT_DIR})
file(MAKE_DIRECTORY ${UA_GEN_NS_OUTPUT_DIR})
endif()

add_custom_command(OUTPUT ${UA_GEN_NS_OUTPUT_DIR}/ua_namespace${FILE_SUFFIX}.c
${UA_GEN_NS_OUTPUT_DIR}/ua_namespace${FILE_SUFFIX}.h
Expand Down

0 comments on commit 6f7fef3

Please sign in to comment.