From: 박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 Date: Fri, 23 Mar 2018 01:01:21 +0000 (+0900) Subject: [ACL] Link system libaries correctly (#174) X-Git-Tag: 0.1~614 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f47dd9b416c7cdd63d7eff22cbd0c57c8e43c3e8;p=platform%2Fcore%2Fml%2Fnnfw.git [ACL] Link system libaries correctly (#174) ARM Compute Library needs libdl and libpthread, but these libraries are not linked, or incorrectly linked. This commit fixes this link issue. Now, cl_convolution and neon_convolution examples built by CMake works on ODROID. Signed-off-by: Jonghyun Park --- diff --git a/externals/acl.cmake b/externals/acl.cmake index 6ba0668..ed96b34 100644 --- a/externals/acl.cmake +++ b/externals/acl.cmake @@ -15,6 +15,7 @@ file(GLOB_RECURSE ACL_UTIL_SRCS "${ACL_BASE}/src/core/utils/*.cpp") 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) ### ### ARM Compute Library Common (Core & Runtime) @@ -41,7 +42,7 @@ file(GLOB ACL_CORE_OPENCL_KERNEL_SRCS "${ACL_BASE}/src/core/CL/kernels/*.cpp") list(APPEND ACL_CORE_OPENCL_SRCS ${ACL_CORE_OPENCL_KERNEL_SRCS}) add_library(acl_core_opencl ${ACL_CORE_OPENCL_SRCS}) -target_link_libraries(acl_core_opencl acl_core_common OpenCL dl) +target_link_libraries(acl_core_opencl acl_core_common OpenCL) file(GLOB_RECURSE ACL_RUNTIME_OPENCL_SRCS "${ACL_BASE}/src/runtime/CL/*.cpp") @@ -100,6 +101,7 @@ add_library(arm_compute_core SHARED ${ACL_CORE_SRCS}) 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_link_libraries(arm_compute_core dl pthread) list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_COMMON_SRCS}) list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_OPENCL_SRCS})