set(TENSORFLOW_LITE_BASE ${TENSORFLOW_BASE}/tensorflow/contrib/lite)
#
+# TensorFlow Graph Definition Accessor
+#
+if(ENABLE_TENSORFLOW_GRAPHDEF)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/versions)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/function)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/types)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/tensor)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/tensor_shape)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/attr_value)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/resource_handle)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/op_def)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/node_def)
+ list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/graph)
+
+ set(TF_GRAPH_PROTO_GENERATED ${CMAKE_CURRENT_BINARY_DIR}/generated)
+
+ foreach(TF_GRAPH_PROTO_TAG ${TF_GRAPH_PROTO_TAGS})
+ add_custom_command(OUTPUT "${TF_GRAPH_PROTO_GENERATED}/${TF_GRAPH_PROTO_TAG}.pb.cc"
+ COMMAND mkdir -p "${TF_GRAPH_PROTO_GENERATED}"
+ COMMAND protoc --proto_path=${TENSORFLOW_BASE} --cpp_out=${TF_GRAPH_PROTO_GENERATED} "${TF_GRAPH_PROTO_TAG}.proto")
+
+ list(APPEND TF_GRAPH_PROTO_SRCS "${TF_GRAPH_PROTO_GENERATED}/${TF_GRAPH_PROTO_TAG}.pb.cc")
+ endforeach()
+
+ add_library(tensorflow_graphdef ${TF_GRAPH_PROTO_SRCS})
+ target_include_directories(tensorflow_graphdef PUBLIC ${TF_GRAPH_PROTO_GENERATED})
+endif(ENABLE_TENSORFLOW_GRAPHDEF)
+
+#
# Tensorflow Lite library
#
file(GLOB TFLITE_CORE_SRCS "${TENSORFLOW_LITE_BASE}/*.c" "${TENSORFLOW_LITE_BASE}/*.cc")