load("//tensorflow_lite_support/metadata:build_defs.bzl", "stamp_metadata_parser_version") package( default_visibility = ["//tensorflow_lite_support:users"], licenses = ["notice"], # Apache 2.0 ) stamp_metadata_parser_version( name = "metadata_parser_h", srcs = ["metadata_parser.h.template"], outs = ["metadata_parser.h"], ) cc_library( name = "metadata_extractor", srcs = ["metadata_extractor.cc"], hdrs = ["metadata_extractor.h"], deps = [ "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@flatbuffers", "@org_libzip//:zip", ] + select({ "//tensorflow_lite_support/cc:tflite_use_c_api": ["@org_tensorflow//tensorflow/lite/c:c_api"], "//conditions:default": ["@org_tensorflow//tensorflow/lite:framework"], }) + [ "@org_tensorflow//tensorflow/lite/schema:schema_fbs", "//tensorflow_lite_support/cc:common", "//tensorflow_lite_support/cc/port:status_macros", "//tensorflow_lite_support/cc/port:statusor", "//tensorflow_lite_support/metadata:metadata_schema_cc", ], ) cc_library( name = "metadata_version", srcs = ["metadata_version.cc"], hdrs = [ "metadata_version.h", ":metadata_parser_h", ], deps = [ "//tensorflow_lite_support/metadata:metadata_schema_cc", "@com_google_absl//absl/strings", "@flatbuffers", "@org_tensorflow//tensorflow/lite/c:common", "@org_tensorflow//tensorflow/lite/kernels/internal:compatibility", "@org_tensorflow//tensorflow/lite/tools:logging", ], )