aboutsummaryrefslogtreecommitdiff
path: root/delegate/cmake/Modules/FindTensorflow.cmake
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-10-19 17:35:30 +0100
committerSadik Armagan <sadik.armagan@arm.com>2020-10-19 16:34:15 +0000
commit3c24f43ff9afb50898d6a73ccddbc0936f72fdad (patch)
treeb4101aab6f085279cddefdc539fb3f622fc8a1b7 /delegate/cmake/Modules/FindTensorflow.cmake
parent418c7dd833accc061ba4cba2743631e582962915 (diff)
downloadarmnn-3c24f43ff9afb50898d6a73ccddbc0936f72fdad.tar.gz
IVGCVSW-5365 'Create the TfLite Delegate subdirectory in ArmNN'
* Created delegate sub-directory under armnn * Created Delegate, ArmnnSubgraph and DelegateOptions classes * Created cmake files. * Integrated doctest (under MIT license) as testing framework Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: If725ebd62c40a97c783cdad22bca48709d44338c
Diffstat (limited to 'delegate/cmake/Modules/FindTensorflow.cmake')
-rw-r--r--delegate/cmake/Modules/FindTensorflow.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/delegate/cmake/Modules/FindTensorflow.cmake b/delegate/cmake/Modules/FindTensorflow.cmake
new file mode 100644
index 0000000000..8b47d30362
--- /dev/null
+++ b/delegate/cmake/Modules/FindTensorflow.cmake
@@ -0,0 +1,30 @@
+#
+# Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+# SPDX-License-Identifier: MIT
+#
+
+include(FindPackageHandleStandardArgs)
+unset(TENSORFLOW_FOUND)
+
+find_path(Tensorflow_INCLUDE_DIR
+ NAMES
+ tensorflow/core
+ tensorflow/cc
+ third_party
+ HINTS
+ ${TENSORFLOW_ROOT})
+
+find_library(Tensorflow_LIB
+ NAMES
+ tensorflow_all
+ HINTS
+ ${TENSORFLOW_ROOT})
+
+## Set TENSORFLOW_FOUND
+find_package_handle_standard_args(Tensorflow DEFAULT_MSG Tensorflow_INCLUDE_DIR Tensorflow_LIB)
+
+## Set external variables for usage in CMakeLists.txt
+if(TENSORFLOW_FOUND)
+ set(Tensorflow_LIB ${Tensorflow_LIB})
+ set(Tensorflow_INCLUDE_DIRS ${Tensorflow_INCLUDE_DIR})
+endif() \ No newline at end of file