Teresa Charlin | ad1b3d7 | 2023-03-14 12:10:28 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2023 Arm Ltd and Contributors. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | set(armnnClassicDelegateObject_sources) |
| 7 | list(APPEND armnnClassicDelegateObject_sources |
| 8 | include/armnn_delegate.hpp |
| 9 | include/Version.hpp |
| 10 | src/armnn_delegate.cpp |
| 11 | src/armnn_external_delegate.cpp |
| 12 | src/Activation.hpp |
| 13 | src/ArgMinMax.hpp |
| 14 | src/BatchMatMul.hpp |
| 15 | src/BatchSpace.hpp |
Matthew Sloyan | 1157232 | 2023-03-16 10:17:51 +0000 | [diff] [blame] | 16 | src/ClassicDelegateUtils.hpp |
Teresa Charlin | ad1b3d7 | 2023-03-14 12:10:28 +0000 | [diff] [blame] | 17 | src/Comparison.hpp |
| 18 | src/Convolution.hpp |
| 19 | src/Control.hpp |
| 20 | src/ElementwiseBinary.hpp |
| 21 | src/ElementwiseUnary.hpp |
| 22 | src/Fill.hpp |
| 23 | src/FullyConnected.hpp |
| 24 | src/Gather.hpp |
| 25 | src/GatherNd.hpp |
| 26 | src/LogicalBinary.hpp |
| 27 | src/Lstm.hpp |
| 28 | src/MultiLayerFacade.hpp |
| 29 | src/Normalization.hpp |
| 30 | src/Pack.hpp |
| 31 | src/Pad.hpp |
| 32 | src/Pooling.hpp |
| 33 | src/Prelu.hpp |
| 34 | src/Quantization.hpp |
| 35 | src/Redefine.hpp |
| 36 | src/Reduce.hpp |
| 37 | src/Resize.hpp |
| 38 | src/Round.hpp |
| 39 | src/Shape.hpp |
| 40 | src/SharedFunctions.hpp |
| 41 | src/SharedFunctions.cpp |
| 42 | src/Slice.hpp |
| 43 | src/Softmax.hpp |
| 44 | src/SpaceDepth.hpp |
| 45 | src/Split.hpp |
| 46 | src/Unpack.hpp |
| 47 | src/Transpose.hpp) |
| 48 | |
| 49 | add_library(armnnClassicDelegateObject OBJECT ${armnnClassicDelegateObject_sources}) |
| 50 | |
| 51 | target_include_directories(armnnClassicDelegateObject |
| 52 | PUBLIC |
| 53 | $<INSTALL_INTERFACE:include> |
| 54 | $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 55 | $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/common/include> |
| 56 | PRIVATE |
| 57 | ${CMAKE_CURRENT_SOURCE_DIR}/src |
| 58 | ${PROJECT_SOURCE_DIR}/common/src) |
| 59 | |
| 60 | ## Add Tflite dependency |
| 61 | if(NOT TfLite_INCLUDE_DIR OR NOT TfLite_Schema_INCLUDE_PATH) |
| 62 | find_package(TfLiteSrc REQUIRED MODULE) |
| 63 | endif() |
| 64 | |
| 65 | # Various tflite header files are not warning clean |
| 66 | # We can't change compilation flags on header files directly, so we need to add them to an interface library first |
| 67 | add_library(tflite_headers INTERFACE) |
| 68 | target_include_directories(tflite_headers |
| 69 | INTERFACE |
| 70 | $<BUILD_INTERFACE:${TfLite_INCLUDE_DIR}> |
| 71 | $<INSTALL_INTERFACE:include/tflite_headers>) |
| 72 | |
| 73 | target_compile_options(tflite_headers |
| 74 | INTERFACE |
| 75 | -Wno-conversion |
| 76 | -Wno-sign-conversion |
| 77 | -Wno-unused-parameter |
| 78 | -Wno-unused-function) |
| 79 | |
| 80 | target_link_libraries(armnnClassicDelegateObject PUBLIC tflite_headers) |
| 81 | |
| 82 | ## Add Flatbuffers dependency |
| 83 | find_package(Flatbuffers REQUIRED MODULE) |
| 84 | |
| 85 | target_link_libraries(armnnClassicDelegateObject PRIVATE ${Flatbuffers_LIB}) |
| 86 | |
| 87 | # include/flatbuffers/flatbuffers.h is not warning clean |
| 88 | # We can't change compilation flags on header files directly, so we need to add them to an interface library first |
| 89 | add_library(flatbuffer_headers INTERFACE) |
| 90 | target_include_directories(flatbuffer_headers |
| 91 | INTERFACE |
| 92 | $<BUILD_INTERFACE:${Flatbuffers_INCLUDE_DIR}> |
| 93 | $<INSTALL_INTERFACE:include/flatbuffer_headers>) |
| 94 | target_compile_options(flatbuffer_headers INTERFACE -Wno-sign-conversion) |
| 95 | |
| 96 | target_link_libraries(armnnClassicDelegateObject PUBLIC flatbuffer_headers) |
| 97 | |
| 98 | #################################################### |
| 99 | ## Export targets |
| 100 | install(TARGETS armnnClassicDelegateObject |
| 101 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 102 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |