blob: 05412d466265ee54962757b11631e9a26849c30a [file] [log] [blame]
Mingyang Sunc4b5d8d2019-07-16 17:57:52 +08001#-------------------------------------------------------------------------------
2# Copyright (c) 2019, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8#Definations to compile the "libtfmsprt" module.
9#This file assumes it will be included from a project specific cmakefile, and
10#will not create a library or executable.
11#Inputs:
12# TFM_ROOT_DIR - root directory of the TF-M repository.
13#Outputs:
14# Will modify include directories to make the source compile.
15# ALL_SRC_C_S: C source files to be compiled will be added to this list. This shall be added to your add_executable or add_library command.
16# ALL_SRC_CXX_S: C++ source files to be compiled will be added to this list. This shaall be added to your add_executable or add_library command.
17# ALL_SRC_ASM_S: assembly source files to be compiled will be added to this list. This shall be added to your add_executable or add_library command.
18# Include directories will be modified by using the include_directories() commands as needed.
19
20#Get the current directory where this file is located.
21set(LIBSPRT_DIR ${CMAKE_CURRENT_LIST_DIR})
22
23if(NOT DEFINED TFM_ROOT_DIR)
24 message(FATAL_ERROR "Please set TFM_ROOT_DIR before including this file.")
25endif()
26
27set (LIBSPRT_C_SRC
28 "${LIBSPRT_DIR}/tfm_libsprt_c_memcpy.c"
Mingyang Sunc6b458b2019-12-19 15:07:34 +080029 "${LIBSPRT_DIR}/tfm_libsprt_c_memmove.c"
30 "${TFM_ROOT_DIR}/interface/src/log/tfm_log_raw.c")
Mingyang Sunc4b5d8d2019-07-16 17:57:52 +080031
32#Append all our source files to global lists.
33list(APPEND ALL_SRC_C_S ${LIBSPRT_C_SRC})
34unset(LIBSPRT_C_SRC)
Mingyang Sunc6b458b2019-12-19 15:07:34 +080035
36#Setting include directories
37embedded_include_directories(PATH ${TFM_ROOT_DIR}/interface/include ABSOLUTE)