Skip to content
Snippets Groups Projects
Commit 478ebd86 authored by Christian Nowke's avatar Christian Nowke
Browse files

changed macro to generates C++ code too

parent 4dc5a47d
No related branches found
No related tags found
No related merge requests found
#add docu #add docu
macro (add_event arg1 event_name dir dir_out) macro (add_event arg1 event_name dir dir_out)
exec_program( "protoc" "${PROTOBUF_BIN}" ARGS "${dir}/${event_name}.proto" "--proto_path=${dir}" "--cpp_out=${dir}" OUTPUT_VARIABLE output )
message ("output of protoc is: ${output}")
message ("${dir}")
exec_program( "protoc" "${PROTOBUF_BIN}" ARGS "${dir}/${event_name}.proto" "--proto_path=${dir}" "--python_out=${dir_out}" OUTPUT_VARIABLE output ) exec_program( "protoc" "${PROTOBUF_BIN}" ARGS "${dir}/${event_name}.proto" "--proto_path=${dir}" "--python_out=${dir_out}" OUTPUT_VARIABLE output )
list (APPEND ${arg1}_EVENT_SOURCE_FILES "${dir}/${event_name}.pb.h" "${dir}/${event_name}.pb.cc") list (APPEND ${arg1}_EVENT_SOURCE_FILES "${dir}/${event_name}.pb.h" "${dir}/${event_name}.pb.cc")
......
...@@ -42,6 +42,7 @@ include_directories ("${CMAKE_CURRENT_BINARY_DIR}") ...@@ -42,6 +42,7 @@ include_directories ("${CMAKE_CURRENT_BINARY_DIR}")
add_event ( nett_python routing_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} ) add_event ( nett_python routing_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} )
add_event ( nett_python string_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} ) add_event ( nett_python string_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} )
add_event ( nett_python float_message ${NETT_SCHEMA_DIR} ${PROJECT_BINARY_DIR} )
add_library (nett_python SHARED ${ProjectSources} ${nett_python_EVENT_SOURCE_FILES}) add_library (nett_python SHARED ${ProjectSources} ${nett_python_EVENT_SOURCE_FILES})
target_link_libraries( nett_python optimized ${NETT_LIBRARY} debug ${NETT_LIBRARY_DEBUG}) target_link_libraries( nett_python optimized ${NETT_LIBRARY} debug ${NETT_LIBRARY_DEBUG})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment