|
1 | 1 | # This CMake code fragment determines the location of the tflite_cc_api package.
|
2 | 2 |
|
| 3 | +set(gradle_src_root "${CMAKE_SOURCE_DIR}/../../..") |
| 4 | + |
3 | 5 | # tflite_cc_api_DIR is the directory containing the CMakeLists.txt file
|
4 | 6 | # for building the TFLite-in-Play-services C++ API client SDK source files.
|
5 |
| -if (NOT EXISTS "${CMAKE_SOURCE_DIR}/tflite_cc_sdk/CMakeLists.txt") |
6 |
| - message(SEND_ERROR "CMakeLists.txt not found in ${CMAKE_SOURCE_DIR}/tflite_cc_sdk") |
7 |
| -elseif (NOT EXISTS "${CMAKE_SOURCE_DIR}/tflite_cc_sdk/tensorflow/lite/abi/cc/interpreter.cc") |
8 |
| - message(SEND_ERROR "tensorflow/lite/abi/cc/interpreter.cc not found in ${CMAKE_SOURCE_DIR}/tflite_cc_sdk") |
| 7 | +if (NOT EXISTS "${gradle_src_root}/build/tflite_cc_sdk/CMakeLists.txt") |
| 8 | + message(SEND_ERROR "CMakeLists.txt not found in ${gradle_src_root}/build/tflite_cc_sdk") |
| 9 | +elseif (NOT EXISTS "${gradle_src_root}/build/tflite_cc_sdk/tensorflow/lite/abi/cc/interpreter.cc") |
| 10 | + message(SEND_ERROR "tensorflow/lite/abi/cc/interpreter.cc not found in ${gradle_src_root}/build/tflite_cc_sdk") |
9 | 11 | else()
|
10 |
| - set(tflite_cc_api_DIR "${CMAKE_SOURCE_DIR}/tflite_cc_sdk") |
| 12 | + set(tflite_cc_api_DIR "${gradle_src_root}/build/tflite_cc_sdk") |
11 | 13 | endif()
|
12 | 14 |
|
13 | 15 | # tflite_cc_api_INCLUDE_DIR is the include directory containing the header
|
14 | 16 | # files for the TFLite-in-Play-services C++ API.
|
15 |
| -if (NOT EXISTS "${CMAKE_SOURCE_DIR}/tflite_cc_sdk/tensorflow/lite/interpreter.h") |
16 |
| - message(SEND_ERROR "tensorflow/lite/interpreter.h not found in ${CMAKE_SOURCE_DIR}/tflite_cc_sdk") |
17 |
| -elseif (NOT EXISTS "${CMAKE_SOURCE_DIR}/tflite_cc_sdk/tensorflow/lite/abi/cc/interpreter.h") |
18 |
| - message(SEND_ERROR "tensorflow/lite/abi/cc/interpreter.h not found in ${CMAKE_SOURCE_DIR}/tflite_cc_sdk") |
| 17 | +if (NOT EXISTS "${gradle_src_root}/build/tflite_cc_sdk/tensorflow/lite/interpreter.h") |
| 18 | + message(SEND_ERROR "tensorflow/lite/interpreter.h not found in ${gradle_src_root}/build/tflite_cc_sdk") |
| 19 | +elseif (NOT EXISTS "${gradle_src_root}/build/tflite_cc_sdk/tensorflow/lite/abi/cc/interpreter.h") |
| 20 | + message(SEND_ERROR "tensorflow/lite/abi/cc/interpreter.h not found in ${gradle_src_root}/build/tflite_cc_sdk") |
19 | 21 | else()
|
20 |
| - set(tflite_cc_api_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/tflite_cc_sdk") |
| 22 | + set(tflite_cc_api_INCLUDE_DIR "${gradle_src_root}/tflite_cc_sdk") |
21 | 23 | endif()
|
22 | 24 |
|
23 | 25 | include(FindPackageHandleStandardArgs)
|
|
0 commit comments