wasm-micro-runtime/core/iwasm/libraries/wasi-nn/wasi_nn.cmake
ayakoakasaka ed6b8efade
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.
2023-04-27 08:19:18 +08:00

23 lines
622 B
CMake

# 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})
include_directories (${WASI_NN_DIR}/src)
include_directories (${WASI_NN_DIR}/src/utils)
set (
LIBC_WASI_NN_SOURCE
${WASI_NN_DIR}/src/wasi_nn.c
${WASI_NN_DIR}/src/wasi_nn_tensorflowlite.cpp
${WASI_NN_DIR}/src/utils/wasi_nn_app_native.c
)
set (TENSORFLOW_LIB tensorflow-lite)