+# NOTE The followings SHOULD be defined before using this CMakeLists.txt
+#
+# 'TensorFlowSource_DIR' variable
+# 'eigen' target
+# 'gemmlowp' target
+# 'neon2sse' target
+# 'farmhash' target
+# 'flatbuffers' target
+#
+set(TensorFlowLiteSource_DIR ${TensorFlowSource_DIR}/tensorflow/contrib/lite)
+
+file(GLOB CORE_SRCS "${TensorFlowLiteSource_DIR}/*.c" "${TensorFlowLiteSource_DIR}/*.cc")
+file(GLOB CORE_TESTS "${TensorFlowLiteSource_DIR}/*test*.cc")
+list(REMOVE_ITEM CORE_SRCS ${CORE_TESTS})
+
+file(GLOB_RECURSE KERNEL_SRCS "${TensorFlowLiteSource_DIR}/kernels/*.cc")
+file(GLOB_RECURSE KERNEL_TESTS "${TensorFlowLiteSource_DIR}/kernels/*test*.cc")
+list(REMOVE_ITEM KERNEL_SRCS ${KERNEL_TESTS})
+# Exclude buggy kernel(s) from the build
+list(REMOVE_ITEM KERNEL_SRCS "${TensorFlowLiteSource_DIR}/kernels/internal/spectrogram.cc")
+
+list(APPEND SRCS ${CORE_SRCS})
+list(APPEND SRCS ${KERNEL_SRCS})
+
add_library(tensorflowlite ${SRCS})
set_target_properties(tensorflowlite PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(tensorflowlite PUBLIC ${TensorFlowSource_DIR})
return()
endif(NOT NEON2SSE_FOUND)
- set(TensorFlowLiteSource_DIR ${TensorFlowSource_DIR}/tensorflow/contrib/lite)
-
- file(GLOB CORE_SRCS "${TensorFlowLiteSource_DIR}/*.c" "${TensorFlowLiteSource_DIR}/*.cc")
- file(GLOB CORE_TESTS "${TensorFlowLiteSource_DIR}/*test*.cc")
- list(REMOVE_ITEM CORE_SRCS ${CORE_TESTS})
-
- file(GLOB_RECURSE KERNEL_SRCS "${TensorFlowLiteSource_DIR}/kernels/*.cc")
- file(GLOB_RECURSE KERNEL_TESTS "${TensorFlowLiteSource_DIR}/kernels/*test*.cc")
- list(REMOVE_ITEM KERNEL_SRCS ${KERNEL_TESTS})
- # Exclude buggy kernel(s) from the build
- list(REMOVE_ITEM KERNEL_SRCS "${TensorFlowLiteSource_DIR}/kernels/internal/spectrogram.cc")
-
- list(APPEND SRCS ${CORE_SRCS})
- list(APPEND SRCS ${KERNEL_SRCS})
-
if(NOT TARGET tensorflowlite)
nncc_find_package(ExternalProjectTools REQUIRED)
add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/TensorFlowLite" tflite)