// Copyright 2023 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["Android-Apache-2.0"], } cc_library { name: "libscreen_recording_server", shared_libs: [ "libgrpc++_unsecure", "libprotobuf-cpp-full", ], static_libs: [ "libgflags", ], cflags: [ "-Wno-unused-parameter", ], generated_headers: [ "ScreenRecordingServerProto_h", ], generated_sources: [ "ScreenRecordingServerProto_cc", ], export_generated_headers: [ "ScreenRecordingServerProto_h", ], defaults: ["cuttlefish_host"], include_dirs: [ "external/grpc-grpc/include", "external/protobuf/src", ], target: { darwin: { enabled: true, }, }, } cc_binary_host { name: "screen_recording_server", shared_libs: [ "libbase", "libcuttlefish_fs", "libcuttlefish_run_cvd_proto", "libcuttlefish_utils", "libgrpc++_unsecure", "libjsoncpp", "libprotobuf-cpp-full", "libprotobuf-cpp-full", ], static_libs: [ "libcuttlefish_command_util", "libcuttlefish_host_config", "libgflags", "libgrpc++_reflection", "libscreen_recording_server", ], srcs: [ "main.cpp", ], cflags: [ "-Wno-unused-parameter", ], defaults: ["cuttlefish_host"], target: { darwin: { enabled: true, }, }, } filegroup { name: "ScreenRecordingServerProto", srcs: [ ":libprotobuf-internal-protos", "screen_recording.proto", ], } genrule { name: "ScreenRecordingServerProto_h", tools: [ "aprotoc", "protoc-gen-grpc-cpp-plugin", ], cmd: "$(location aprotoc) -Idevice/google/cuttlefish/host/commands/screen_recording_server -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", srcs: [ ":ScreenRecordingServerProto", ], out: [ "screen_recording.grpc.pb.h", "screen_recording.pb.h", ], } genrule { name: "ScreenRecordingServerProto_cc", tools: [ "aprotoc", "protoc-gen-grpc-cpp-plugin", ], cmd: "$(location aprotoc) -Idevice/google/cuttlefish/host/commands/screen_recording_server -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)", srcs: [ ":ScreenRecordingServerProto", ], out: [ "screen_recording.grpc.pb.cc", "screen_recording.pb.cc", ], }