blob: 8b47d30362180f9c0c1f3bbe7c1724780cd367ca [file] [log] [blame]
Sadik Armagan3c24f432020-10-19 17:35:30 +01001#
2# Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3# SPDX-License-Identifier: MIT
4#
5
6include(FindPackageHandleStandardArgs)
7unset(TENSORFLOW_FOUND)
8
9find_path(Tensorflow_INCLUDE_DIR
10 NAMES
11 tensorflow/core
12 tensorflow/cc
13 third_party
14 HINTS
15 ${TENSORFLOW_ROOT})
16
17find_library(Tensorflow_LIB
18 NAMES
19 tensorflow_all
20 HINTS
21 ${TENSORFLOW_ROOT})
22
23## Set TENSORFLOW_FOUND
24find_package_handle_standard_args(Tensorflow DEFAULT_MSG Tensorflow_INCLUDE_DIR Tensorflow_LIB)
25
26## Set external variables for usage in CMakeLists.txt
27if(TENSORFLOW_FOUND)
28 set(Tensorflow_LIB ${Tensorflow_LIB})
29 set(Tensorflow_INCLUDE_DIRS ${Tensorflow_INCLUDE_DIR})
30endif()