From fca233eed08f4ec3b793fe76abae540e391f8319 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Thu, 23 Sep 2021 12:16:53 +0100 Subject: IVGCVSW-6181 patch to allow building against tflite > v2.3 Change-Id: I292add699b2af32fab87b98929fe6fee79fdf356 Signed-off-by: Jim Flynn --- delegate/cmake/Modules/FindTfLiteSrc.cmake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 delegate/cmake/Modules/FindTfLiteSrc.cmake (limited to 'delegate/cmake/Modules/FindTfLiteSrc.cmake') diff --git a/delegate/cmake/Modules/FindTfLiteSrc.cmake b/delegate/cmake/Modules/FindTfLiteSrc.cmake new file mode 100644 index 0000000000..91833c18e6 --- /dev/null +++ b/delegate/cmake/Modules/FindTfLiteSrc.cmake @@ -0,0 +1,28 @@ +# +# Copyright © 2021 Arm Ltd and Contributors. All rights reserved. +# SPDX-License-Identifier: MIT +# + +include(FindPackageHandleStandardArgs) +unset(TFLITE_SRC_FOUND) + +find_path(TfLite_INCLUDE_DIR + NAMES + tensorflow/lite + third_party + HINTS + ${TENSORFLOW_ROOT}) + +find_path(TfLite_Schema_INCLUDE_PATH + schema_generated.h + HINTS + ${TENSORFLOW_ROOT}/tensorflow/lite/schema) + +## Set TFLITE_FOUND +find_package_handle_standard_args(TfLiteSrc DEFAULT_MSG TfLite_INCLUDE_DIR TfLite_Schema_INCLUDE_PATH) + +## Set external variables for usage in CMakeLists.txt +if(TFLITE_SRC_FOUND) + set(TfLite_INCLUDE_DIR ${TfLite_INCLUDE_DIR}) + set(TfLite_Schema_INCLUDE_PATH ${TfLite_Schema_INCLUDE_PATH}) +endif() -- cgit v1.2.1