Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/cmake/Findtensorflow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,16 @@ find_path(TensorFlow_INCLUDE_DIRS_GOOGLE
PATH_SUFFIXES "/include"
NO_DEFAULT_PATH
)
message(STATUS proto ${TensorFlow_INCLUDE_DIRS_GOOGLE})
if (NOT TensorFlow_INCLUDE_DIRS_GOOGLE)
message(STATUS "Protobuf headers are not found in the directory of TensorFlow, assuming external protobuf was used to build TensorFlow")
# try to find from ldd list of TF library
# a warning is threw here, just ignore it
file(GET_RUNTIME_DEPENDENCIES
RESOLVED_DEPENDENCIES_VAR TensorFlow_LINKED_LIBRARIES
UNRESOLVED_DEPENDENCIES_VAR TensorFlow_LINKED_LIBRARIES_UNRESOLVED
LIBRARIES ${TensorFlowFramework_LIBRARY}
POST_INCLUDE_REGEXES "^.+protobuf\..+$"
DIRECTORIES $ENV{LD_LIBRARY_PATH}
)
# search protobuf from linked libraries
foreach(_lib ${TensorFlow_LINKED_LIBRARIES})
Expand Down