include("${CMAKE_SOURCE_DIR}/cmake/BuildboxCommonProtoc.cmake") # protoc_compile

protoc_compile(PCH PROTOS
    build/bazel/remote/asset/v1/remote_asset
    build/bazel/remote/execution/v2/remote_execution
    build/bazel/remote/logstream/v1/remote_logstream
    build/bazel/semver/semver
    build/buildbox/execution_stats
    build/buildbox/local_execution
    build/buildgrid/local_cas
    build/buildgrid/scheduling
    google/api/annotations
    google/api/http
    google/bytestream/bytestream
    google/longrunning/operations
    google/rpc/code
    google/rpc/status
    google/rpc/error_details
    google/devtools/remoteworkers/v1test2/bots
    google/devtools/remoteworkers/v1test2/worker
    rexplorer
    trexe/result_metadata
    worker_config)

add_custom_target(generate_protobufs DEPENDS ${PROTO_GENERATED_SRCS})
set(PROTO_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
set(PROTO_GENERATED_SRCS ${PROTO_GENERATED_SRCS} PARENT_SCOPE)
set(PROTO_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
