Commit 988b483a authored by Navid Nikaein's avatar Navid Nikaein

* automatic generation of protobuf messages in CMakeList.txt

parent bd1de293
...@@ -712,8 +712,8 @@ if (ENB_AGENT) ...@@ -712,8 +712,8 @@ if (ENB_AGENT)
) )
set(PRPT_C_DIR ${protobuf_generated_dir}/${PRPTDIR}) set(PRPT_C_DIR ${protobuf_generated_dir}/${PRPTDIR})
message("calling ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES}") #message("calling protoc_call=${protoc_call} PRPT_C_DIR=${PRPT_C_DIR} PRPT_MSG_FILES=${PRPT_MSG_FILES}")
execute_process(COMMAND ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES}) execute_process(COMMAND ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_DIR} ${PRPT_MSG_FILES})
file(GLOB PRPT_source ${PRPT_C_DIR}/*.c) file(GLOB PRPT_source ${PRPT_C_DIR}/*.c)
set(PRPT_OAI_generated set(PRPT_OAI_generated
${PRPT_C_DIR}/header.pb-c.c ${PRPT_C_DIR}/header.pb-c.c
...@@ -729,7 +729,7 @@ if (ENB_AGENT) ...@@ -729,7 +729,7 @@ if (ENB_AGENT)
${PRPT_OAI_generated} ${PRPT_OAI_generated}
${PRPT_source} ${PRPT_source}
) )
set(PRPT_MSG_LIB PRPT_MSG)
include_directories ("${PRPT_C_DIR}") include_directories ("${PRPT_C_DIR}")
add_library(ASYNC_IF add_library(ASYNC_IF
...@@ -1647,7 +1647,7 @@ add_executable(oaisim_nos1 ...@@ -1647,7 +1647,7 @@ add_executable(oaisim_nos1
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim_nos1 target_link_libraries (oaisim_nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${ASYNC_IF_LIB} RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${PRPT_MSG_LIB} ${ASYNC_IF_LIB}
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
......
...@@ -3,12 +3,16 @@ ...@@ -3,12 +3,16 @@
function main() function main()
{ {
mkdir -p $1 mkdir -p $1
cd $1
echo generate protobuf messages inside $1 $2 #echo generate protobuf messages inside $1 $2
protoc-c --c_out=$1 $2 c_out=$1
protoc --cpp_out=$1 $2 shift
proto_path=$1
shift
protoc-c --c_out=$c_out --proto_path=$proto_path $*
#protoc --cpp_out=$c_out --proto_path=$proto_path $*
} }
......
package protocol; package protocol;
import "stats_messages.proto"; import "stats_messages.proto";
import "header.proto" import "header.proto";
message progran_message { message progran_message {
oneof msg { oneof msg {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment