Support multiple NN API bindings
authorJonghyun Park <jh1302.park@samsung.com>
Mon, 26 Feb 2018 10:36:11 +0000 (19:36 +0900)
committer박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 26 Feb 2018 10:54:08 +0000 (19:54 +0900)
This commit revises CMake script to support multiple NN API bindings.

To support multiple NN API bindings, CMake sciprt for simple logging NN API binding
is revised not to install libneuralnetworks.so into lib.

In addition, directory structres are revised.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
README.md
tools/CMakeLists.txt
tools/nnapi_bindings/CMakeLists.txt [new file with mode: 0644]
tools/nnapi_bindings/bindings/CMakeLists.txt [new file with mode: 0644]
tools/nnapi_bindings/bindings/logging/CMakeLists.txt [moved from tools/nnapi_logging/CMakeLists.txt with 60% similarity]
tools/nnapi_bindings/bindings/logging/include/operation.def [moved from tools/nnapi_logging/include/operation.def with 100% similarity]
tools/nnapi_bindings/bindings/logging/src/nnapi_logging.cc [moved from tools/nnapi_logging/src/nnapi_logging.cc with 100% similarity]
tools/nnapi_bindings/include/nnapi.h [moved from include/nnapi.h with 100% similarity]

index 6b610a8..7277865 100644 (file)
--- a/README.md
+++ b/README.md
@@ -7,5 +7,5 @@ This repo provides a T/F Lite Model loader(named ``tflite_run``), and simple NNA
 Let's type the following commands, and see what happens!
 ```
 $ make install
-$ USE_NNAPI=1 LD_LIBRARY_PATH="$(pwd)/Product/out/lib" Product/out/bin/tflite_run [T/F Lite Flatbuffer Model Path]
+$ USE_NNAPI=1 LD_LIBRARY_PATH="$(pwd)/Product/obj/tools/nnapi_bindings/bindings/logging" Product/out/bin/tflite_run [T/F Lite Flatbuffer Model Path]
 ```
index a714df1..1abaede 100644 (file)
@@ -1,2 +1,2 @@
 add_subdirectory(tflite_run)
-add_subdirectory(nnapi_logging)
+add_subdirectory(nnapi_bindings)
diff --git a/tools/nnapi_bindings/CMakeLists.txt b/tools/nnapi_bindings/CMakeLists.txt
new file mode 100644 (file)
index 0000000..547d50e
--- /dev/null
@@ -0,0 +1,3 @@
+set(NNAPI_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+add_subdirectory(bindings)
diff --git a/tools/nnapi_bindings/bindings/CMakeLists.txt b/tools/nnapi_bindings/bindings/CMakeLists.txt
new file mode 100644 (file)
index 0000000..504db2b
--- /dev/null
@@ -0,0 +1 @@
+add_subdirectory(logging)
similarity index 60%
rename from tools/nnapi_logging/CMakeLists.txt
rename to tools/nnapi_bindings/bindings/logging/CMakeLists.txt
index 9328656..2df3e90 100644 (file)
@@ -1,7 +1,5 @@
 file(GLOB_RECURSE NNAPI_LOGGING_SRCS "src/*.cc")
 
 add_library(neuralnetworks SHARED ${NNAPI_LOGGING_SRCS})
-target_include_directories(neuralnetworks PUBLIC ${CMAKE_SOURCE_DIR}/include)
+target_include_directories(neuralnetworks PUBLIC ${NNAPI_INCLUDE_DIR})
 target_include_directories(neuralnetworks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
-
-install(TARGETS neuralnetworks DESTINATION lib)