[Android] Enable build for all runtimes (#1475)
author이한종/동작제어Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Thu, 31 May 2018 07:03:38 +0000 (16:03 +0900)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 31 May 2018 07:03:38 +0000 (16:03 +0900)
Enable Android build for runtimes including pure_arm_compute
For link library, pthread should be parameterized.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
CMakeLists.txt
cmake/packages/ARMCompute/CMakeLists.txt
cmake/packages/ARMComputeConfig.cmake
cmake/packages/TensorflowConfig.cmake

index 89b959f..747bf26 100644 (file)
@@ -171,10 +171,7 @@ if("${TARGET_OS}" STREQUAL "android")
   add_subdirectory(tools/nnapi_test)
   add_subdirectory(tools/tflite_benchmark)
 
-  if(BUILD_NN_RUNTIME)
-    set(LIB_RUNTIME runtime)
-    add_subdirectory(runtimes/nn)
-  endif(BUILD_NN_RUNTIME)
+  add_subdirectory(runtimes)
 
 else("${TARGET_OS}" STREQUAL "android") # General case (non-android build)
 
index 19e5a22..88a79ef 100644 (file)
@@ -17,7 +17,7 @@ if(BUILD_ACL_STATIC_LIB)
   add_library(acl_foundation ${ACL_UTIL_SRCS})
   target_include_directories(acl_foundation PUBLIC "${ACL_BASE}")
   target_include_directories(acl_foundation PUBLIC "${ACL_BASE}/include")
-  target_link_libraries(acl_foundation dl pthread)
+  target_link_libraries(acl_foundation dl ${LIB_PTHREAD})
 endif(BUILD_ACL_STATIC_LIB)
 
 ###
@@ -121,7 +121,7 @@ target_include_directories(arm_compute_core PUBLIC "${ACL_GENERATED}")
 target_include_directories(arm_compute_core PUBLIC "${ACL_BASE}")
 target_include_directories(arm_compute_core PUBLIC "${ACL_BASE}/include")
 target_include_directories(arm_compute_core PUBLIC "${ACL_BASE}/arm_compute/core/NEON/kernels/assembly")
-target_link_libraries(arm_compute_core dl pthread)
+target_link_libraries(arm_compute_core dl ${LIB_PTHREAD})
 install(TARGETS arm_compute_core DESTINATION lib)
 
 list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_COMMON_SRCS})
index b542438..7d37530 100644 (file)
@@ -57,7 +57,7 @@ function(_ARMCompute_Import)
   if(NOT TARGET arm_compute_core)
     add_library(arm_compute_core INTERFACE)
     target_include_directories(arm_compute_core INTERFACE ${INCLUDE_DIR})
-    target_link_libraries(arm_compute_core INTERFACE dl pthread)
+       target_link_libraries(arm_compute_core INTERFACE dl ${LIB_PTHREAD})
     target_link_libraries(arm_compute_core INTERFACE ${CORE_LIBRARY})
     if (${TARGET_OS} STREQUAL "tizen")
       target_link_libraries(arm_compute_core INTERFACE OpenCL)
index b6c5c0c..ab4e271 100644 (file)
@@ -33,7 +33,7 @@ function(_Tensorflow_Import)
     target_link_libraries(tensorflow-core INTERFACE -Wl,--whole-archive "${TENSORFLOW_GEN_DIR}/lib/libtensorflow-core.a" -Wl,--no-whole-archive)
     target_link_libraries(tensorflow-core INTERFACE "${TENSORFLOW_GEN_DIR}/protobuf/lib/libprotobuf.a")
     target_link_libraries(tensorflow-core INTERFACE "${TENSORFLOW_DOWNLOADS_DIR}/nsync/builds/${NSYNC_ARCH}.linux.c++11/libnsync.a")
-    target_link_libraries(tensorflow-core INTERFACE pthread dl)
+    target_link_libraries(tensorflow-core INTERFACE ${LIB_PTHREAD} dl)
 
     message(STATUS "Found Tensorflow (lib: ${TENSORFLOW_GEN_DIR}/lib/libtensorflow-core.a")
   endif()