Matteo Martincigh | 4e73b42 | 2019-08-08 13:46:32 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | # File needed to wrap the existing backend into a dynamic one |
| 7 | list(APPEND armnnRefDynamicBackend_sources |
| 8 | RefDynamicBackend.cpp |
| 9 | RefDynamicBackend.hpp |
| 10 | ) |
| 11 | |
| 12 | # Set the backend source path |
| 13 | set(RefBackendPath ${PROJECT_SOURCE_DIR}/src/backends/reference) |
| 14 | |
| 15 | # Source files of the backend, taken directly from the source tree |
| 16 | file(GLOB RefBackendBaseFiles ${RefBackendPath}/*.cpp) |
| 17 | set(RefBackendFiles ${RefBackendBaseFiles}) |
| 18 | |
| 19 | # Remove the file that contains the static backend registration |
| 20 | list(REMOVE_ITEM RefBackendFiles ${RefBackendPath}/RefRegistryInitializer.cpp) |
| 21 | |
| 22 | # Create the shared object |
| 23 | add_library(Arm_CpuRef_backend MODULE ${armnnRefDynamicBackend_sources} ${RefBackendFiles}) |
| 24 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 25 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils) |
| 26 | target_include_directories(Arm_CpuRef_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 27 | set_target_properties(Arm_CpuRef_backend PROPERTIES PREFIX "") |
| 28 | target_link_libraries(Arm_CpuRef_backend armnn) |