From f9f16d2847ae85b9e89f6aa4472fcb07ba7480e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Mon, 10 Dec 2018 15:32:43 +0900 Subject: [PATCH] Change nnapi library name and update cmake (#3956) Chane nnapi library name: nnfw_support_nnapi -> nnfw_lib_nnapi Specify library type as static Remove unused nnapi library link Signed-off-by: Hyeongseok Oh --- libs/nnapi/CMakeLists.txt | 8 ++++---- runtimes/neurun/CMakeLists.txt | 2 +- runtimes/neurun/src/backend/acl_cl/CMakeLists.txt | 2 +- runtimes/neurun/src/backend/cpu/CMakeLists.txt | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libs/nnapi/CMakeLists.txt b/libs/nnapi/CMakeLists.txt index 92b27b1..21f473b 100644 --- a/libs/nnapi/CMakeLists.txt +++ b/libs/nnapi/CMakeLists.txt @@ -1,6 +1,6 @@ file(GLOB_RECURSE SOURCES "src/*.cpp") -add_library(nnfw_support_nnapi ${SOURCES}) -set_property(TARGET nnfw_support_nnapi PROPERTY POSITION_INDEPENDENT_CODE ON) -target_include_directories(nnfw_support_nnapi PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include) -target_link_libraries(nnfw_support_nnapi static_nnfw_util) +add_library(nnfw_lib_nnapi STATIC ${SOURCES}) +set_property(TARGET nnfw_lib_nnapi PROPERTY POSITION_INDEPENDENT_CODE ON) +target_include_directories(nnfw_lib_nnapi PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include) +target_link_libraries(nnfw_lib_nnapi static_nnfw_util) diff --git a/runtimes/neurun/CMakeLists.txt b/runtimes/neurun/CMakeLists.txt index 08237b6..60116dc 100644 --- a/runtimes/neurun/CMakeLists.txt +++ b/runtimes/neurun/CMakeLists.txt @@ -36,7 +36,7 @@ target_include_directories(${LIB_NEURUN} PUBLIC ${CMAKE_SOURCE_DIR}/externals/te target_link_libraries(${LIB_NEURUN} arm_compute) target_link_libraries(${LIB_NEURUN} tensorflow-lite) target_link_libraries(${LIB_NEURUN} nnfw_util) -target_link_libraries(${LIB_NEURUN} nnfw_support_nnapi) +target_link_libraries(${LIB_NEURUN} nnfw_lib_nnapi) # TODO This will be removed when backends are converted to plugins target_link_libraries(${LIB_NEURUN} ${LIB_NEURUN_BACKEND_CPU}) diff --git a/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt b/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt index f1c17aa..737f1be 100644 --- a/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt +++ b/runtimes/neurun/src/backend/acl_cl/CMakeLists.txt @@ -7,7 +7,7 @@ target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PUBLIC ${NEURUN_INCLUDE_ target_include_directories(${LIB_NEURUN_BACKEND_ACL_CL} PUBLIC ${CMAKE_SOURCE_DIR}/externals/tensorflow) # TODO Remove this file. We should not need this. target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} arm_compute) -target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} nnfw_support_nnapi) +target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} nnfw_lib_nnapi) target_link_libraries(${LIB_NEURUN_BACKEND_ACL_CL} ${LIB_NEURUN_KERNEL_ACL_CL}) target_compile_options(${LIB_NEURUN_BACKEND_ACL_CL} PRIVATE -Wall -Wextra -Werror) diff --git a/runtimes/neurun/src/backend/cpu/CMakeLists.txt b/runtimes/neurun/src/backend/cpu/CMakeLists.txt index d01c8ee..a163fc1 100644 --- a/runtimes/neurun/src/backend/cpu/CMakeLists.txt +++ b/runtimes/neurun/src/backend/cpu/CMakeLists.txt @@ -9,7 +9,6 @@ target_include_directories(${LIB_NEURUN_BACKEND_CPU} PUBLIC ${CMAKE_SOURCE_DIR}/ target_link_libraries(${LIB_NEURUN_BACKEND_CPU} arm_compute) # TODO We should not need this target_link_libraries(${LIB_NEURUN_BACKEND_CPU} tensorflow-lite) target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_util) -target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_support_nnapi) target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_lib_cpp14) target_link_libraries(${LIB_NEURUN_BACKEND_CPU} ${LIB_NEURUN_KERNEL_CPU}) # TODO remove this line once acl dependency is removed from PermuteLayer -- 2.7.4