blob: bd6e036365be79677ec34bb3847290d898210831 [file] [log] [blame]
Gyorgy Szing49091802020-11-24 00:33:09 +01001#-------------------------------------------------------------------------------
Andrew Beggs97a00d42021-06-15 15:45:46 +00002# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
Gyorgy Szing49091802020-11-24 00:33:09 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8if (NOT DEFINED TGT)
9 message(FATAL_ERROR "mandatory parameter TGT is not defined.")
10endif()
11
12target_sources(${TGT} PRIVATE
13 "${CMAKE_CURRENT_LIST_DIR}/libsp_entry.c"
Imre Kis2ccd8e82021-10-08 11:21:14 +020014 "${CMAKE_CURRENT_LIST_DIR}/sp_trace.c"
Gyorgy Szing49091802020-11-24 00:33:09 +010015 )
Andrew Beggs97a00d42021-06-15 15:45:46 +000016
17target_include_directories(${TGT}
Imre Kis2ccd8e82021-10-08 11:21:14 +020018 PUBLIC
19 "${CMAKE_CURRENT_LIST_DIR}/include"
20 )
21
22if (NOT DEFINED TRACE_PREFIX)
23 set(TRACE_PREFIX "SP" CACHE STRING "Trace prefix")
24endif()
25
26if (NOT DEFINED TRACE_LEVEL)
27 set(TRACE_LEVEL "TRACE_LEVEL_ERROR" CACHE STRING "Trace level")
28endif()
29
30target_compile_definitions(${TGT} PRIVATE
31 TRACE_LEVEL=${TRACE_LEVEL}
32 TRACE_PREFIX="${TRACE_PREFIX}"
33)