Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared vs Static #3

Open
ghost opened this issue Feb 13, 2019 · 0 comments
Open

Shared vs Static #3

ghost opened this issue Feb 13, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 13, 2019

tensorflow_cc builds static by default.  inception_cmake is looking for shared instead.
Here is the proposed `fix`

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5e41bd..5d1970c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ set(BASE_PROTO_SOURCE_DIR_OVERRIDE ${SERVING_SOURCE_DIR})

 find_package(Protobuf REQUIRED)
 find_package(GRPC REQUIRED)
-find_package(TensorflowCC REQUIRED COMPONENTS Shared)
+find_package(TensorflowCC REQUIRED COMPONENTS Static)

 set(TFS_PROTOS
   ${SERVING_SOURCE_DIR}/tensorflow_serving/apis/regression.proto
@@ -40,13 +40,13 @@ set(GRPC_GENERATE_CPP_APPEND_PATH OFF)
 PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTO_SRC_DIR} ${TFS_PROTOS})
 GRPC_GENERATE_CPP(GRPC_SRCS GRPC_HDRS ${PROTO_SRC_DIR} ${TFS_PROTOS})

-add_library(tfserving SHARED ${PROTO_SRCS} ${GRPC_SRCS})
+add_library(tfserving STATIC ${PROTO_SRCS} ${GRPC_SRCS})
 add_custom_target(tfserving_headers DEPENDS ${PROTO_HDRS} ${GRPC_HDRS})
 add_dependencies(tfserving tfserving_headers)

 target_include_directories(tfserving PUBLIC ${PROTO_SRC_DIR})
 target_link_libraries(tfserving PUBLIC
-  TensorflowCC::Shared
+  TensorflowCC::Static
   gRPC::grpc++_reflection
   protobuf::libprotobuf
 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants