blob: f8b03009765df1497fbb6fc41395053a1ea2d83c [file] [log] [blame]
Sadik Armagan3c24f432020-10-19 17:35:30 +01001#
Kevin May93bbf002024-03-11 09:31:10 +00002# Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved.
Sadik Armagan3c24f432020-10-19 17:35:30 +01003# SPDX-License-Identifier: MIT
4#
5
Jan Eilersb968a4f2020-11-15 14:44:43 +00006cmake_minimum_required (VERSION 3.7.0)
Sadik Armagan3c24f432020-10-19 17:35:30 +01007project(armnnDelegate)
Ryan OShea238ecd92023-03-07 11:44:23 +00008set(CMAKE_CXX_STANDARD 17)
9set(CMAKE_CXX_STANDARD_REQUIRED ON)
Ryan OShea238ecd92023-03-07 11:44:23 +000010set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Werror -Wold-style-cast -Wno-missing-braces -Wconversion -Wsign-conversion -Wno-comment")
Finn Williamsbbbefec2020-11-25 14:32:42 +000011set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
Sadik Armagan3c24f432020-10-19 17:35:30 +010012
Teresa Charlinad1b3d72023-03-14 12:10:28 +000013option(BUILD_UNIT_TESTS "Build unit tests" ON)
14option(BUILD_CLASSIC_DELEGATE "Build classic delegate" ON)
15option(BUILD_OPAQUE_DELEGATE "Build opaque delegate" OFF)
16option(BUILD_SHARED_LIBS "Build share libs" ON)
17option(BUILD_DELEGATE_JNI_INTERFACE "Builds a library to allow accessing the Arm NN delegate from Java code.
18 This is an experimental feature." ON)
19
Sadik Armagan3c24f432020-10-19 17:35:30 +010020set(armnnDelegate_sources)
21list(APPEND armnnDelegate_sources
Teresa Charlinad1b3d72023-03-14 12:10:28 +000022 common/include/DelegateOptions.hpp
23 common/src/DelegateOptions.cpp
David Monahan6c53f9f2023-04-27 15:21:19 +010024 common/src/DelegateUtils.hpp
25 common/src/MultiLayerFacade.hpp)
Sadik Armagan3c24f432020-10-19 17:35:30 +010026
27## Add Armnn as a Dependency
Finn Williamsbbbefec2020-11-25 14:32:42 +000028if(NOT ARMNN_SUB_PROJECT)
29 find_package(Armnn REQUIRED CONFIG HINTS ${Armnn_DIR})
30endif()
Teresa Charlinad1b3d72023-03-14 12:10:28 +000031
32if (BUILD_CLASSIC_DELEGATE)
33 add_subdirectory(classic)
34 add_library(armnnDelegate ${armnnDelegate_sources})
35
36 target_include_directories(armnnDelegate
37 PUBLIC
38 $<INSTALL_INTERFACE:include>
39 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/common/include>
40 PRIVATE
41 ${CMAKE_CURRENT_SOURCE_DIR}/common/src)
42endif()
43if (BUILD_OPAQUE_DELEGATE)
44 add_subdirectory(opaque)
45 add_library(armnnOpaqueDelegate ${armnnDelegate_sources})
46
47 target_include_directories(armnnOpaqueDelegate
48 PUBLIC
49 $<INSTALL_INTERFACE:include>
50 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/common/include>
51 PRIVATE
52 ${CMAKE_CURRENT_SOURCE_DIR}/common/src)
53endif()
54
55include(GNUInstallDirs)
56
57if (BUILD_CLASSIC_DELEGATE)
58 target_link_libraries(armnnDelegate PUBLIC Armnn::Armnn)
59
60 ## Add armnnClassicDelegateObject as a Dependency
61 target_link_libraries(armnnDelegate PUBLIC armnnClassicDelegateObject)
62endif()
63if (BUILD_OPAQUE_DELEGATE)
64 target_link_libraries(armnnOpaqueDelegate PUBLIC Armnn::Armnn)
65
66 ## Add armnnOpaqueDelegateObject as a Dependency
67 target_link_libraries(armnnOpaqueDelegate PUBLIC armnnOpaqueDelegateObject)
68endif()
Sadik Armagan3c24f432020-10-19 17:35:30 +010069
Keith Davis9a701c82021-09-28 16:43:24 +010070## Add TfLite dependency
Jim Flynnfca233e2021-09-23 12:16:53 +010071find_package(TfLiteSrc REQUIRED MODULE)
Sadik Armagan3c24f432020-10-19 17:35:30 +010072find_package(TfLite REQUIRED MODULE)
Teresa Charlinad1b3d72023-03-14 12:10:28 +000073if (BUILD_CLASSIC_DELEGATE)
74 target_link_libraries(armnnDelegate PUBLIC ${TfLite_LIB})
Sadik Armagan3c24f432020-10-19 17:35:30 +010075
Teresa Charlinad1b3d72023-03-14 12:10:28 +000076 # lpthread and ldl are not required for Android
77 if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL Android)
78 target_link_libraries(armnnDelegate PUBLIC -lpthread)
79 target_link_libraries(armnnDelegate PUBLIC -ldl)
80 endif()
Keith Davisd62eef92021-09-20 18:17:33 +010081endif()
Teresa Charlinad1b3d72023-03-14 12:10:28 +000082if (BUILD_OPAQUE_DELEGATE)
83 target_link_libraries(armnnOpaqueDelegate PUBLIC ${TfLite_LIB})
Keith Davisd62eef92021-09-20 18:17:33 +010084
Teresa Charlinad1b3d72023-03-14 12:10:28 +000085 # lpthread and ldl are not required for Android
86 if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL Android)
87 target_link_libraries(armnnOpaqueDelegate PUBLIC -lpthread)
88 target_link_libraries(armnnOpaqueDelegate PUBLIC -ldl)
89 endif()
90endif()
Sadik Armagan3c24f432020-10-19 17:35:30 +010091
Narumol Prangnawarat4cf0fe32020-12-18 16:13:06 +000092# Add libraries from armnn third-party libraries
93# Third-party header files are not warning clean
94# We can't change compilation flags on header files directly, so we need to add them to an interface library first
95add_library(thirdparty_headers INTERFACE)
96target_include_directories(thirdparty_headers INTERFACE $<BUILD_INTERFACE:${ARMNN_SOURCE_DIR}/third-party>
97 $<INSTALL_INTERFACE:include/thirdparty_headers>)
98
99target_compile_options(thirdparty_headers INTERFACE -Wno-old-style-cast)
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000100if (BUILD_CLASSIC_DELEGATE)
101 target_link_libraries(armnnDelegate PUBLIC thirdparty_headers)
102endif()
103if (BUILD_OPAQUE_DELEGATE)
104 target_link_libraries(armnnOpaqueDelegate PUBLIC thirdparty_headers)
105endif()
Narumol Prangnawarat4cf0fe32020-12-18 16:13:06 +0000106
Jim Flynnfca233e2021-09-23 12:16:53 +0100107add_library(profiling_library_headers INTERFACE)
108target_include_directories(profiling_library_headers INTERFACE $<BUILD_INTERFACE:${ARMNN_SOURCE_DIR}/profiling>
109 $<INSTALL_INTERFACE:include/profiling_library_headers>)
Jim Flynnfca233e2021-09-23 12:16:53 +0100110
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000111if (BUILD_CLASSIC_DELEGATE)
112 target_link_libraries(armnnDelegate PUBLIC profiling_library_headers)
113 target_link_libraries(armnnDelegate PUBLIC Armnn::armnnUtils)
Matthew Sloyanac001ee2021-02-03 10:43:04 +0000114
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000115 set_target_properties(armnnDelegate PROPERTIES VERSION ${DELEGATE_LIB_VERSION} SOVERSION ${DELEGATE_LIB_SOVERSION})
116endif()
117if (BUILD_OPAQUE_DELEGATE)
118 target_link_libraries(armnnOpaqueDelegate PUBLIC profiling_library_headers)
119 target_link_libraries(armnnOpaqueDelegate PUBLIC Armnn::armnnUtils)
120
121 set_target_properties(armnnOpaqueDelegate PROPERTIES VERSION ${OPAQUE_DELEGATE_LIB_VERSION} SOVERSION ${OPAQUE_DELEGATE_LIB_SOVERSION})
122endif()
123
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100124if(BUILD_UNIT_TESTS)
125 set(commonDelegate_unittest_sources)
126 list(APPEND commonDelegate_unittest_sources
127 common/src/test/DelegateTestInterpreter.hpp
128 common/src/test/DelegateTestInterpreterUtils.hpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000129 test/ActivationTest.cpp
130 test/ActivationTestHelper.hpp
131 test/ArgMinMaxTest.cpp
132 test/ArgMinMaxTestHelper.hpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000133 test/BatchMatMulTest.cpp
134 test/BatchMatMulTestHelper.hpp
135 test/BatchSpaceTest.cpp
136 test/BatchSpaceTestHelper.hpp
Idriss Chaouchcbf79292023-09-08 11:18:16 +0100137 test/BroadcastToTest.cpp
138 test/BroadcastToTestHelper.hpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000139 test/CastTest.cpp
140 test/CastTestHelper.hpp
141 test/ComparisonTest.cpp
142 test/ComparisonTestHelper.hpp
143 test/ControlTest.cpp
144 test/ControlTestHelper.hpp
145 test/Convolution2dTest.cpp
146 test/Convolution3dTest.cpp
147 test/ConvolutionTestHelper.hpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000148 test/DepthwiseConvolution2dTest.cpp
149 test/ElementwiseBinaryTest.cpp
150 test/ElementwiseBinaryTestHelper.hpp
151 test/ElementwiseUnaryTest.cpp
152 test/ElementwiseUnaryTestHelper.hpp
Matthew Sloyan3504e422023-05-03 13:53:02 +0100153 test/ExpandDimsTest.cpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000154 test/FillTest.cpp
155 test/FillTestHelper.hpp
156 test/FullyConnectedTest.cpp
157 test/FullyConnectedTestHelper.hpp
158 test/GatherTest.cpp
159 test/GatherTestHelper.hpp
160 test/GatherNdTest.cpp
161 test/GatherNdTestHelper.hpp
162 test/LogicalTest.cpp
163 test/LogicalTestHelper.hpp
164 test/LstmTest.cpp
165 test/LstmTestHelper.hpp
166 test/MirrorPadTest.cpp
167 test/NormalizationTest.cpp
168 test/NormalizationTestHelper.hpp
169 test/PackTest.cpp
170 test/PackTestHelper.hpp
171 test/PadTest.cpp
172 test/PadTestHelper.hpp
173 test/Pooling2dTest.cpp
174 test/Pooling2dTestHelper.hpp
175 test/Pooling3dTest.cpp
176 test/Pooling3dTestHelper.hpp
177 test/PreluTest.cpp
178 test/PreluTestHelper.hpp
179 test/QuantizationTest.cpp
180 test/QuantizationTestHelper.hpp
181 test/RedefineTestHelper.hpp
182 test/ReduceTest.cpp
183 test/ReduceTestHelper.hpp
184 test/ReshapeTest.cpp
185 test/ResizeTest.cpp
186 test/ResizeTestHelper.hpp
Tracy Narine7306bbe2023-07-17 16:06:26 +0100187 test/ReverseV2Test.cpp
188 test/ReverseV2TestHelper.hpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000189 test/RoundTest.cpp
190 test/RoundTestHelper.hpp
Kevin May93bbf002024-03-11 09:31:10 +0000191 test/ScatterNdTest.cpp
192 test/ScatterNdTestHelper.hpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000193 test/SoftmaxTest.cpp
194 test/SoftmaxTestHelper.hpp
195 test/SpaceDepthTest.cpp
196 test/SpaceDepthTestHelper.hpp
197 test/ShapeTest.cpp
198 test/ShapeTestHelper.hpp
199 test/SliceTest.cpp
200 test/SliceTestHelper.hpp
Matthew Sloyan3504e422023-05-03 13:53:02 +0100201 test/SqueezeTest.cpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000202 test/StridedSliceTest.cpp
203 test/StridedSliceTestHelper.hpp
204 test/SplitTest.cpp
205 test/SplitTestHelper.hpp
206 test/TestUtils.hpp
207 test/TestUtils.cpp
Tianle Cheng92ce35c2023-07-25 16:41:00 +0100208 test/TileTest.cpp
209 test/TileTestHelper.hpp
Matthew Sloyan080ffd82023-04-24 12:53:04 +0100210 test/TransposeConvolution2dTest.cpp
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000211 test/TransposeTest.cpp
212 test/TransposeTestHelper.hpp
213 test/UnidirectionalSequenceLstmTest.cpp
214 test/UnidirectionalSequenceLstmTestHelper.hpp
215 test/UnpackTest.cpp
216 test/UnpackTestHelper.hpp)
Sadik Armagan3c24f432020-10-19 17:35:30 +0100217
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100218 # There's a known Android NDK bug which causes a subset of NeonLayerTests to
219 # fail. We'll exclude these tests in NeonLayerTests_NDK_Bug.cpp if we're doing
220 # a debug build and NDK is less than r21.
221 # https://github.com/android/ndk/issues/1135
Keith Davis7c67fab2021-04-08 11:47:23 +0100222
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100223 # Default to always including these tests.
224 set(INCLUDE_NDK_BUG_TESTS "ON")
225 # Reconsider if we in a debug build.
226 string( TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE_LOWERCASE )
227 if ( NOT BUILD_TYPE_LOWERCASE STREQUAL "release" )
228 message("CMAKE:: BUILD TYPE IS ${CMAKE_BUILD_TYPE}")
229 # And NDK_VERSION has been set.
230 if ( DEFINED NDK_VERSION )
231 message("CMAKE:: NDK DEFINED")
232 # And the version is less than r21.
233 if ( ${NDK_VERSION} STRLESS "r21" )
234 message("CMAKE:: BUG TESTS OFF")
235 set(INCLUDE_NDK_BUG_TESTS "OFF")
Keith Davis7c67fab2021-04-08 11:47:23 +0100236 endif()
237 endif()
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100238 endif()
Keith Davis7c67fab2021-04-08 11:47:23 +0100239
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100240 if ( INCLUDE_NDK_BUG_TESTS STREQUAL "ON" )
241 list(APPEND commonDelegate_unittest_sources
242 test/NeonDelegateTests_NDK_Issue.cpp)
243 endif()
Keith Davis7c67fab2021-04-08 11:47:23 +0100244
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100245 if (BUILD_CLASSIC_DELEGATE)
246 set(classicDelegate_unittest_sources)
247 list(APPEND classicDelegate_unittest_sources
248 classic/src/test/ArmnnClassicDelegateTest.cpp
Ryan OShea59f8f652023-05-11 20:37:53 +0100249 classic/src/test/DelegateTestInterpreter.cpp
250 test/DelegateOptionsTest.cpp
251 test/DelegateOptionsTestHelper.hpp)
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100252
253 add_executable(DelegateUnitTests ${commonDelegate_unittest_sources} ${classicDelegate_unittest_sources})
Keith Davis7c67fab2021-04-08 11:47:23 +0100254
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000255 target_include_directories(DelegateUnitTests SYSTEM PRIVATE "${TF_LITE_SCHEMA_INCLUDE_PATH}")
Matthew Sloyanebe392d2023-03-30 10:12:08 +0100256 target_include_directories(DelegateUnitTests SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/common/src/test")
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100257 target_include_directories(DelegateUnitTests PUBLIC ${PROJECT_SOURCE_DIR})
Sadik Armagan3c24f432020-10-19 17:35:30 +0100258
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000259 # Add half library from armnn third-party libraries
260 target_link_libraries(DelegateUnitTests PRIVATE thirdparty_headers)
Ryan OSheaac9607f2023-04-03 11:33:33 +0100261 target_link_libraries(DelegateUnitTests PRIVATE armnnDelegate)
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000262 target_link_libraries(DelegateUnitTests PRIVATE Armnn::armnnUtils)
Teresa Charlinad1b3d72023-03-14 12:10:28 +0000263 target_link_libraries(DelegateUnitTests PRIVATE profiling_library_headers)
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100264 endif()
265
266 if (BUILD_OPAQUE_DELEGATE)
267 set(opaqueDelegate_unittest_sources)
268 list(APPEND opaqueDelegate_unittest_sources
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100269 opaque/src/test/ArmnnOpaqueDelegateTest.cpp
Ryan OShea59f8f652023-05-11 20:37:53 +0100270 opaque/src/test/DelegateTestInterpreter.cpp)
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100271
272 # Until all operators are supported, we have to add tests one by one above to opaqueDelegate_unittest_sources.
273 # After we add can add commonDelegate_unittest_sources to the add_executable below.
Ryan OShea59f8f652023-05-11 20:37:53 +0100274 add_executable(OpaqueDelegateUnitTests ${opaqueDelegate_unittest_sources} ${commonDelegate_unittest_sources})
Matthew Sloyan65c21a12023-04-04 12:06:14 +0100275
276 target_include_directories(OpaqueDelegateUnitTests SYSTEM PRIVATE "${TF_LITE_SCHEMA_INCLUDE_PATH}")
277 target_include_directories(OpaqueDelegateUnitTests SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/common/src/test")
278 target_include_directories(OpaqueDelegateUnitTests PUBLIC ${PROJECT_SOURCE_DIR})
279
280 # Add half library from armnn third-party libraries
281 target_link_libraries(OpaqueDelegateUnitTests PRIVATE thirdparty_headers)
282 target_link_libraries(OpaqueDelegateUnitTests PRIVATE armnnOpaqueDelegate)
283 target_link_libraries(OpaqueDelegateUnitTests PRIVATE Armnn::armnnUtils)
284 target_link_libraries(OpaqueDelegateUnitTests PRIVATE profiling_library_headers)
285 endif()
Sadik Armagan4189cc52020-11-11 18:01:48 +0000286endif()
Sadik Armagan3c24f432020-10-19 17:35:30 +0100287
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100288if(BUILD_DELEGATE_JNI_INTERFACE AND BUILD_CLASSIC_DELEGATE)
Jan Eilersa96489a2021-12-08 10:05:47 +0000289 add_subdirectory(armnnDelegateJNI)
290endif()
291
Sadik Armagan3c24f432020-10-19 17:35:30 +0100292####################################################
293## Export targets
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100294if (BUILD_CLASSIC_DELEGATE)
295 set(armnn_delegate_export_targets)
296 list(APPEND armnn_delegate_export_targets
297 armnnClassicDelegateObject
298 armnnDelegate
299 tflite_headers
300 flatbuffer_headers
301 profiling_library_headers
302 thirdparty_headers)
Sadik Armagan3c24f432020-10-19 17:35:30 +0100303
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100304 install(
305 TARGETS ${armnn_delegate_export_targets}
306 EXPORT armnn-delegate-targets
307 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
308 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
309 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Sadik Armagan3c24f432020-10-19 17:35:30 +0100310
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100311 ## Set export alias
312 set_target_properties(armnnDelegate
313 PROPERTIES
314 EXPORT_NAME ArmnnDelegate)
Sadik Armagan3c24f432020-10-19 17:35:30 +0100315
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100316 ## Export target scrips
317 install(
318 EXPORT armnn-delegate-targets
319 FILE ArmnnDelegateTargets.cmake
320 NAMESPACE ArmnnDelegate::
321 DESTINATION ${CMAKE_INSTALL_LIBDIR})
Sadik Armagan3c24f432020-10-19 17:35:30 +0100322
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100323 ## Create ArmnnDelegateConfig.cmake
324 include(CMakePackageConfigHelpers)
325 set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR})
326 message(STATUS "CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}" )
327 message(STATUS "CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}" )
328 SET(Armnn_DIR "${Armnn_DIR}")
Finn Williamsbbbefec2020-11-25 14:32:42 +0000329
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100330 configure_package_config_file(
331 ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules/ArmnnDelegateConfig.cmake.in
332 ${CMAKE_CURRENT_BINARY_DIR}/ArmnnDelegateConfig.cmake
333 INSTALL_DESTINATION ${INSTALL_CONFIGDIR}
334 PATH_VARS Armnn_DIR)
Sadik Armagan3c24f432020-10-19 17:35:30 +0100335
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100336 ## Install ArmNN Delegate config file
337 install(
338 FILES
339 ${CMAKE_CURRENT_BINARY_DIR}/ArmnnDelegateConfig.cmake
340 DESTINATION ${INSTALL_CONFIGDIR})
Sadik Armagan3c24f432020-10-19 17:35:30 +0100341
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100342 ## Export from build tree
343 export(
344 EXPORT armnn-delegate-targets
345 FILE ${CMAKE_CURRENT_BINARY_DIR}/ArmnnDelegateTargets.cmake
346 NAMESPACE ArmnnDelegate::)
347 add_library(ArmnnDelegate::ArmnnDelegate ALIAS armnnDelegate)
348endif()
Sadik Armagan3c24f432020-10-19 17:35:30 +0100349
Narumol Prangnawarat50c87d32020-11-09 18:42:11 +0000350####################################################
Narumol Prangnawarat46e574e2023-05-05 16:39:05 +0100351## Export opaque delegate targets
352
353if(BUILD_OPAQUE_DELEGATE)
354 set(armnn_opaque_delegate_export_targets)
355 list(APPEND armnn_opaque_delegate_export_targets
356 armnnOpaqueDelegateObject
357 armnnOpaqueDelegate
358 tflite_headers
359 flatbuffer_headers
360 profiling_library_headers
361 thirdparty_headers)
362
363 install(
364 TARGETS armnnOpaqueDelegate
365 EXPORT armnn-opaque-delegate-targets
366 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
367 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
368 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
369
370 ## Set export alias
371 set_target_properties(armnnOpaqueDelegate
372 PROPERTIES
373 EXPORT_NAME ArmnnOpaqueDelegate)
374
375 add_library(ArmnnDelegate::ArmnnOpaqueDelegate ALIAS armnnOpaqueDelegate)
376endif()
377
378####################################################