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