From f66c78ec3ac21248d2a0dc0427f8d87d503e9636 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 19 Apr 2021 19:25:00 -0400 Subject: [PATCH] Do not find protobuf for python In conda-forge's recent released tensorflow, protobuf is external from tensorflow and not inside the tensorflow directory. --- source/cmake/Findtensorflow.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/cmake/Findtensorflow.cmake b/source/cmake/Findtensorflow.cmake index 708b8e86d5..e77376ad3c 100644 --- a/source/cmake/Findtensorflow.cmake +++ b/source/cmake/Findtensorflow.cmake @@ -32,6 +32,7 @@ find_path(TensorFlow_INCLUDE_DIRS PATH_SUFFIXES "/include" NO_DEFAULT_PATH ) +if (BUILD_CPP_IF) find_path(TensorFlow_INCLUDE_DIRS_GOOGLE NAMES google/protobuf/type.pb.h @@ -40,6 +41,7 @@ find_path(TensorFlow_INCLUDE_DIRS_GOOGLE NO_DEFAULT_PATH ) list(APPEND TensorFlow_INCLUDE_DIRS ${TensorFlow_INCLUDE_DIRS_GOOGLE}) +endif () if (NOT TensorFlow_INCLUDE_DIRS AND tensorflow_FIND_REQUIRED) message(FATAL_ERROR