Avoid re-installing if Tensorflow is already installed for WASI-NN (#2148)

Since the Tensorflow library is already installed in many cases(especially in the
case of the embedded system), move the installation code to find_package.
This commit is contained in:
ayakoakasaka
2023-04-27 02:19:18 +02:00
committed by GitHub
parent c1723b8f3e
commit ed6b8efade
3 changed files with 46 additions and 20 deletions

View File

@ -1,6 +1,11 @@
# Copyright (C) 2019 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
# Find tensorflow-lite
find_package(tensorflow_lite REQUIRED)
set (WASI_NN_DIR ${CMAKE_CURRENT_LIST_DIR})
include_directories (${WASI_NN_DIR})