From: 이한종/동작제어Lab(SR)/Engineer/삼성전자 Date: Thu, 31 May 2018 07:03:38 +0000 (+0900) Subject: [Android] Enable build for all runtimes (#1475) X-Git-Tag: 0.2~754 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc64365fd31af89a81dd3e0d241d1f1e7494eaa5;p=platform%2Fcore%2Fml%2Fnnfw.git [Android] Enable build for all runtimes (#1475) Enable Android build for runtimes including pure_arm_compute For link library, pthread should be parameterized. Signed-off-by: Hanjoung Lee --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 89b959f..747bf26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/packages/ARMCompute/CMakeLists.txt b/cmake/packages/ARMCompute/CMakeLists.txt index 19e5a22..88a79ef 100644 --- a/cmake/packages/ARMCompute/CMakeLists.txt +++ b/cmake/packages/ARMCompute/CMakeLists.txt @@ -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}) diff --git a/cmake/packages/ARMComputeConfig.cmake b/cmake/packages/ARMComputeConfig.cmake index b542438..7d37530 100644 --- a/cmake/packages/ARMComputeConfig.cmake +++ b/cmake/packages/ARMComputeConfig.cmake @@ -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) diff --git a/cmake/packages/TensorflowConfig.cmake b/cmake/packages/TensorflowConfig.cmake index b6c5c0c..ab4e271 100644 --- a/cmake/packages/TensorflowConfig.cmake +++ b/cmake/packages/TensorflowConfig.cmake @@ -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()