@@ -111,50 +111,16 @@ add_corstone_subdirectory(${SYSTEM_CONFIG} ${ETHOS_SDK_PATH})
111111configure_timing_adapters(${SYSTEM_CONFIG} ${MEMORY_MODE} )
112112
113113# Dependencies from the ExecuTorch build
114- add_library (executorch STATIC IMPORTED )
115- set_property (
116- TARGET executorch PROPERTY IMPORTED_LOCATION
117- "${ET_BUILD_DIR_PATH} /libexecutorch.a"
118- )
119-
120- add_library (executorch_core STATIC IMPORTED )
121- set_property (
122- TARGET executorch_core PROPERTY IMPORTED_LOCATION
123- "${ET_BUILD_DIR_PATH} /libexecutorch_core.a"
114+ find_package (
115+ executorch REQUIRED HINTS "${ET_BUILD_DIR_PATH} /lib/cmake/ExecuTorch"
124116)
125- target_link_libraries (executorch INTERFACE executorch_core)
126117
127- add_library (executorch_delegate_ethos_u STATIC IMPORTED )
118+ add_library (arm_portable_ops_lib STATIC IMPORTED )
128119set_property (
129- TARGET executorch_delegate_ethos_u
130- PROPERTY IMPORTED_LOCATION
131- "${ET_BUILD_DIR_PATH} /backends/arm/libexecutorch_delegate_ethos_u.a"
132- )
133-
134- add_library (portable_ops_lib STATIC IMPORTED )
135- set_property (
136- TARGET portable_ops_lib
120+ TARGET arm_portable_ops_lib
137121 PROPERTY IMPORTED_LOCATION
138122 "${ET_BUILD_DIR_PATH} /examples/arm/libarm_portable_ops_lib.a"
139123)
140- add_library (portable_kernels STATIC IMPORTED )
141- set_property (
142- TARGET portable_kernels
143- PROPERTY IMPORTED_LOCATION
144- "${ET_BUILD_DIR_PATH} /kernels/portable/libportable_kernels.a"
145- )
146- add_library (quantized_ops_lib STATIC IMPORTED )
147- set_property (
148- TARGET quantized_ops_lib
149- PROPERTY IMPORTED_LOCATION
150- "${ET_BUILD_DIR_PATH} /kernels/quantized/libquantized_ops_lib.a"
151- )
152- add_library (quantized_kernels STATIC IMPORTED )
153- set_property (
154- TARGET quantized_kernels
155- PROPERTY IMPORTED_LOCATION
156- "${ET_BUILD_DIR_PATH} /kernels/quantized/libquantized_kernels.a"
157- )
158124add_library (cortex_m_ops_lib STATIC IMPORTED )
159125set_property (
160126 TARGET cortex_m_ops_lib
@@ -167,13 +133,6 @@ set_property(
167133 PROPERTY IMPORTED_LOCATION
168134 "${ET_BUILD_DIR_PATH} /backends/cortex_m/libcortex_m_kernels.a"
169135)
170- add_library (extension_runner_util STATIC IMPORTED )
171- set_property (
172- TARGET extension_runner_util
173- PROPERTY
174- IMPORTED_LOCATION
175- "${ET_BUILD_DIR_PATH} /extension/runner_util/libextension_runner_util.a"
176- )
177136
178137# Convert pte to header
179138if (NOT ${SEMIHOSTING} )
@@ -208,11 +167,11 @@ list(
208167 extension_runner_util
209168 ethosu_target_init
210169 executorch
170+ quantized_ops_lib
211171 "-Wl,--whole-archive"
212172 executorch_delegate_ethos_u
213173 cortex_m_ops_lib
214- quantized_ops_lib
215- portable_ops_lib
174+ arm_portable_ops_lib
216175 quantized_kernels
217176 cortex_m_kernels
218177 portable_kernels
@@ -224,27 +183,10 @@ list(
224183if (EXECUTORCH_ENABLE_EVENT_TRACER)
225184 target_compile_options (arm_executor_runner PUBLIC -DET_EVENT_TRACER_ENABLED)
226185
227- add_library (etdump STATIC IMPORTED )
228- set_property (
229- TARGET etdump PROPERTY IMPORTED_LOCATION
230- "${ET_BUILD_DIR_PATH} /lib/libetdump.a"
231- )
232-
233- add_library (flatccrt STATIC IMPORTED )
234- set_property (
235- TARGET flatccrt PROPERTY IMPORTED_LOCATION
236- "${ET_BUILD_DIR_PATH} /lib/libflatccrt.a"
237- )
238-
239186 list (APPEND arm_executor_runner_link etdump flatccrt)
240187endif ()
241188
242189if (ET_BUNDLE_IO)
243- add_library (bundled_program STATIC IMPORTED )
244- set_property (
245- TARGET bundled_program
246- PROPERTY IMPORTED_LOCATION "${ET_BUILD_DIR_PATH} /lib/libbundled_program.a"
247- )
248190 list (APPEND arm_executor_runner_link bundled_program)
249191endif ()
250192
0 commit comments