Mingyang Sun | c4b5d8d | 2019-07-16 17:57:52 +0800 | [diff] [blame^] | 1 | #------------------------------------------------------------------------------- |
| 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. |
| 21 | set(LIBSPRT_DIR ${CMAKE_CURRENT_LIST_DIR}) |
| 22 | |
| 23 | if(NOT DEFINED TFM_ROOT_DIR) |
| 24 | message(FATAL_ERROR "Please set TFM_ROOT_DIR before including this file.") |
| 25 | endif() |
| 26 | |
| 27 | set (LIBSPRT_C_SRC |
| 28 | "${LIBSPRT_DIR}/tfm_libsprt_c_memcpy.c" |
| 29 | "${LIBSPRT_DIR}/tfm_libsprt_c_memmove.c") |
| 30 | |
| 31 | #Append all our source files to global lists. |
| 32 | list(APPEND ALL_SRC_C_S ${LIBSPRT_C_SRC}) |
| 33 | unset(LIBSPRT_C_SRC) |