Build TensorFlow Lite in build/externals/tflite (#405)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Tue, 3 Jul 2018 09:34:29 +0000 (18:34 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 3 Jul 2018 09:34:29 +0000 (18:34 +0900)
This commit revises TensorFlowLite package to build tensorflow lite
under build/externals/tflite.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
cmake/packages/TensorFlowLite/CMakeLists.txt [new file with mode: 0644]
cmake/packages/TensorFlowLiteConfig.cmake

diff --git a/cmake/packages/TensorFlowLite/CMakeLists.txt b/cmake/packages/TensorFlowLite/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d636854
--- /dev/null
@@ -0,0 +1,6 @@
+add_library(tensorflowlite ${SRCS})
+set_target_properties(tensorflowlite PROPERTIES POSITION_INDEPENDENT_CODE ON)
+target_include_directories(tensorflowlite PUBLIC ${TensorFlowSource_DIR})
+target_compile_options(tensorflowlite PUBLIC -Wno-ignored-attributes)
+target_compile_definitions(tensorflowlite PUBLIC "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK")
+target_link_libraries(tensorflowlite eigen gemmlowp neon2sse farmhash flatbuffers dl)
index 8fe09da..ef990cb 100644 (file)
@@ -57,12 +57,8 @@ function(_TensorFlowLite_import)
   list(APPEND SRCS ${KERNEL_SRCS})
 
   if(NOT TARGET tensorflowlite)
-    add_library(tensorflowlite ${SRCS})
-    set_target_properties(tensorflowlite PROPERTIES POSITION_INDEPENDENT_CODE ON)
-    target_include_directories(tensorflowlite PUBLIC ${TensorFlowSource_DIR})
-    target_compile_options(tensorflowlite PUBLIC -Wno-ignored-attributes)
-    target_compile_definitions(tensorflowlite PUBLIC "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK")
-    target_link_libraries(tensorflowlite eigen gemmlowp neon2sse farmhash flatbuffers dl)
+    nncc_find_package(ExternalProjectTools REQUIRED)
+    add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/TensorFlowLite" tflite)
   endif(NOT TARGET tensorflowlite)
 
   set(TensorFlowLite_FOUND TRUE PARENT_SCOPE)