diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ec7118..2962387 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,14 +235,7 @@ function(grpc_proto) list(APPEND GRPC_PROTO_SRCS ${src_out}/${src_stem}.pb.cc) list(APPEND GRPC_PROTO_HDRS ${src_out}/${src_stem}.pb.h) make_directory(${src_out}) - add_custom_command( - OUTPUT ${GRPC_PROTO_SRCS} ${GRPC_PROTO_HDRS} - COMMAND ${_PROTOBUF_PROTOC} - --cpp_out "${src_out}" - -I "${src_path}" - "${GRPC_PROTO_SOURCE}" - DEPENDS "${GRPC_PROTO_SOURCE}" - ) + execute_process(COMMAND ${_PROTOBUF_PROTOC} --cpp_out "${src_out}" -I "${src_path}" "${GRPC_PROTO_SOURCE}") target_sources(${GRPC_PROTO_TARGET} PRIVATE ${GRPC_PROTO_SRCS}) target_include_directories(${GRPC_PROTO_TARGET} PRIVATE ${src_out}) endforeach() @@ -490,4 +483,4 @@ if(TESTS) target_link_libraries(looper_tests PRIVATE liblooper) target_link_libraries(liblooper PUBLIC gtest_main) target_compile_definitions(liblooper PUBLIC TESTS) -endif() \ No newline at end of file +endif()