From 80c8609e3e0d31b1f3caab8c290e3b8dfc98adb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=84=B8=ED=9D=AC/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 21 Oct 2019 18:55:23 +0900 Subject: [PATCH] [tfkit] use mio-tf (#8357) This will let tfkit to use mio-tf so that one TensorFlow protobuf library is produced Signed-off-by: SaeHie Park --- compiler/tfkit/CMakeLists.txt | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/compiler/tfkit/CMakeLists.txt b/compiler/tfkit/CMakeLists.txt index 418128d..b809658 100644 --- a/compiler/tfkit/CMakeLists.txt +++ b/compiler/tfkit/CMakeLists.txt @@ -1,43 +1,13 @@ -nnas_find_package(Protobuf QUIET) -nnas_find_package(TensorFlowSource EXACT 1.12 QUIET) - -if(NOT Protobuf_FOUND) - return() -endif(NOT Protobuf_FOUND) - -if(NOT TensorFlowSource_FOUND) +if(NOT TARGET mio_tf) return() -endif(NOT TensorFlowSource_FOUND) +endif(NOT TARGET mio_tf) message(STATUS "Build tfkit: TRUE") -# Minimal Protocol Buffer specification for GraphDef file (.pb) encoding/decoding -unset(PROTO_FILES) -list(APPEND PROTO_FILES tensorflow/core/framework/versions.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/resource_handle.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/types.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/tensor.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/tensor_shape.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/attr_value.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/op_def.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/node_def.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/function.proto) -list(APPEND PROTO_FILES tensorflow/core/framework/graph.proto) - -Protobuf_Generate(TENSORFLOW_GRAPHDEF_PROTO - "${CMAKE_CURRENT_BINARY_DIR}/generated" - "${TensorFlowSource_DIR}" - ${PROTO_FILES}) - file(GLOB_RECURSE SOURCES "src/*.cpp") -add_library(tfkitproto STATIC ${TENSORFLOW_GRAPHDEF_PROTO_SOURCES}) -set_target_properties(tfkitproto PROPERTIES POSITION_INDEPENDENT_CODE ON) -target_include_directories(tfkitproto PUBLIC ${TENSORFLOW_GRAPHDEF_PROTO_INCLUDE_DIRS}) -target_link_libraries(tfkitproto PUBLIC libprotobuf) - add_executable(tfkit ${SOURCES}) target_link_libraries(tfkit PRIVATE stdex) target_link_libraries(tfkit PRIVATE cli) -target_link_libraries(tfkit PRIVATE tfkitproto) +target_link_libraries(tfkit PRIVATE mio_tf) target_link_libraries(tfkit PRIVATE nncc_common) -- 2.7.4