1# Copyright 2023 Arm Limited and/or its affiliates. 2# 3# This source code is licensed under the BSD-style license found in the 4# LICENSE file in the root directory of this source tree. 5cmake_minimum_required(VERSION 3.19) 6project(arm_backend) 7 8set(CMAKE_EXPORT_COMPILE_COMMANDS ON) 9 10# Source root directory for executorch. 11if(NOT EXECUTORCH_ROOT) 12 set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..) 13endif() 14 15include(${EXECUTORCH_ROOT}/build/Utils.cmake) 16 17set(_common_include_directories ${EXECUTORCH_ROOT}/..) 18 19# Third-party folder and Ethos-U driver inclued 20set(THIRD_PARTY_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/third-party") 21set(DRIVER_ETHOSU_INCLUDE_DIR "${THIRD_PARTY_ROOT}/ethos-u-core-driver/include") 22include_directories(${DRIVER_ETHOSU_INCLUDE_DIR}) 23 24set(_arm_baremetal_sources backends/arm/runtime/ArmBackendEthosU.cpp 25 backends/arm/runtime/VelaBinStream.cpp 26) 27list(TRANSFORM _arm_baremetal_sources PREPEND "${EXECUTORCH_ROOT}/") 28 29add_library(executorch_delegate_ethos_u STATIC ${_arm_baremetal_sources}) 30target_include_directories( 31 executorch_delegate_ethos_u PUBLIC ${_common_include_directories} 32) 33target_include_directories( 34 executorch_delegate_ethos_u PUBLIC ${DRIVER_ETHOSU_INCLUDE_DIR} 35) 36