1# 2# Arm SCP/MCP Software 3# Copyright (c) 2022, Linaro Limited and Contributors. All rights reserved. 4# 5# SPDX-License-Identifier: BSD-3-Clause 6# 7 8add_library(arch-optee) 9 10if(NOT CFG_NUM_THREADS) 11 message(FATAL_ERROR 12 "Insufficient firmware metadata provided.\n" 13 "For optee arch, you must set CFG_NUM_THREADS") 14endif() 15 16if(NOT SCP_OPTEE_DIR) 17 message(FATAL_ERROR 18 "Insufficient firmware metadata provided.\n" 19 "For optee arch, you must set SCP_OPTEE_DIR") 20endif() 21 22target_compile_definitions(arch-optee PUBLIC -DCFG_NUM_THREADS=${CFG_NUM_THREADS}) 23 24target_include_directories(arch-optee 25 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") 26 27target_link_libraries(arch-optee 28 PUBLIC module-optee-mbx) 29 30target_sources( 31 arch-optee PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/arch_interrupt.c" 32 "${CMAKE_CURRENT_SOURCE_DIR}/src/arch_main.c") 33