summaryrefslogtreecommitdiff
path: root/runtimes/pure_arm_compute/CMakeLists.txt
blob: 2a26a7bf29499f93d668e060feed8863de2e249d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if(NOT BUILD_PURE_ARM_COMPUTE)
  return()
endif(NOT BUILD_PURE_ARM_COMPUTE)

nnfw_find_package(ARMCompute REQUIRED)

file(GLOB_RECURSE SOURCES "src/*.cc")

add_library(nnapi_pure_arm_compute SHARED ${SOURCES})
# To ignore compiler warnings from ARM Compute Library
target_compile_options(nnapi_pure_arm_compute PRIVATE -Wno-ignored-attributes)
target_include_directories(nnapi_pure_arm_compute PUBLIC ${NNFW_INCLUDE_DIR})
target_include_directories(nnapi_pure_arm_compute PUBLIC src)
if(BUILD_TFLITE_BENCHMARK_MODEL)
  target_compile_definitions(nnapi_pure_arm_compute PUBLIC "TFLITE_PROFILING_ENABLED")
endif()
target_link_libraries(nnapi_pure_arm_compute arm_compute arm_compute_ex)
target_link_libraries(nnapi_pure_arm_compute nnfw_lib_cpp14 nnfw_lib_misc nnfw_lib_profiling)

if("${TARGET_OS}" STREQUAL "android")
  target_link_libraries(nnapi_pure_arm_compute log)
endif()

set_target_properties(nnapi_pure_arm_compute PROPERTIES OUTPUT_NAME neuralnetworks)
install(TARGETS nnapi_pure_arm_compute DESTINATION lib/pureacl RENAME neuralnetworks)
install(TARGETS nnapi_pure_arm_compute DESTINATION lib RENAME neuralnetworks)

# To prevent undefined references
add_executable(pure_arm_compute_symbolcheck symbolcheck.cpp)
target_link_libraries(pure_arm_compute_symbolcheck nnapi_pure_arm_compute)