Use shared library for LeNet example (#188)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 26 Mar 2018 04:51:07 +0000 (13:51 +0900)
committer서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com>
Mon, 26 Mar 2018 04:51:07 +0000 (13:51 +0900)
This commit revises 'external/acl.cmake' to use shared library (instead
of static library) for LeNet example build.

This allows users to run 'graph_lenet' example.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
externals/acl.cmake

index ed96b34..7de2034 100644 (file)
@@ -22,6 +22,10 @@ target_link_libraries(acl_foundation dl pthread)
 ###
 file(GLOB ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/*.cpp")
 list(APPEND ACL_CORE_COMMON_SRCS "arm_compute_version.embed")
+# Both CL & NEON runtime funtions use these CPP kernels
+list(APPEND ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/CPP/kernels/CPPCornerCandidatesKernel.cpp")
+list(APPEND ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.cpp")
+list(APPEND ACL_CORE_COMMON_SRCS "${ACL_BASE}/src/core/CPP/kernels/CPPSortEuclideanDistanceKernel.cpp")
 
 add_library(acl_core_common ${ACL_CORE_COMMON_SRCS})
 target_include_directories(acl_core_common PUBLIC "${ACL_GENERATED}")
@@ -86,9 +90,6 @@ list(APPEND ACL_GRAPH_SRCS ${ACL_GRAPH_NEON_SRCS})
 add_library(acl_graph ${ACL_GRAPH_SRCS})
 target_link_libraries(acl_graph acl_runtime_opencl acl_runtime_neon)
 
-add_executable(graph_lenet "${ACL_BASE}/examples/graph_lenet.cpp" "${ACL_BASE}/utils/Utils.cpp" "${ACL_BASE}/utils/GraphUtils.cpp")
-target_link_libraries(graph_lenet acl_graph)
-
 ###
 ### ARM Compute Shared Libraries
 ###
@@ -108,7 +109,10 @@ list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_OPENCL_SRCS})
 list(APPEND ACL_RUNTIME_SRCS ${ACL_RUNTIME_NEON_SRCS})
 
 add_library(arm_compute SHARED ${ACL_RUNTIME_SRCS})
-target_link_libraries(arm_compute arm_compute_core)
+target_link_libraries(arm_compute arm_compute_core OpenCL)
 
 add_library(arm_compute_graph SHARED ${ACL_GRAPH_SRCS})
 target_link_libraries(arm_compute_graph arm_compute)
+
+add_executable(graph_lenet "${ACL_BASE}/examples/graph_lenet.cpp" "${ACL_BASE}/utils/Utils.cpp" "${ACL_BASE}/utils/GraphUtils.cpp")
+target_link_libraries(graph_lenet arm_compute_graph)