blob: a03aff59afd1190f83f4134778d00217d1322832 [file] [log] [blame]
Tamas Banb881bea2020-11-04 16:18:36 +00001#-------------------------------------------------------------------------------
2# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8cmake_minimum_required(VERSION 3.15)
9
Raef Coles02a76002021-04-26 12:01:16 +010010add_library(tfm_fih_headers INTERFACE)
11add_library(tfm_fih_implementation STATIC)
Tamas Banb881bea2020-11-04 16:18:36 +000012
Raef Coles02a76002021-04-26 12:01:16 +010013target_sources(tfm_fih_implementation
Tamas Banb881bea2020-11-04 16:18:36 +000014 PRIVATE
15 src/fih.c
16)
17
Raef Coles02a76002021-04-26 12:01:16 +010018target_include_directories(tfm_fih_headers
19 INTERFACE
Tamas Banb881bea2020-11-04 16:18:36 +000020 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
21)
22
Raef Coles02a76002021-04-26 12:01:16 +010023target_link_libraries(tfm_fih_implementation
24 PUBLIC
25 tfm_fih_headers
26 platform_common_interface
Tamas Banb881bea2020-11-04 16:18:36 +000027)
28
Raef Coles02a76002021-04-26 12:01:16 +010029target_compile_definitions(tfm_fih_headers
30 INTERFACE
Tamas Banb881bea2020-11-04 16:18:36 +000031 TFM_FIH_PROFILE_${TFM_FIH_PROFILE}
32 $<$<NOT:$<STREQUAL:${TFM_FIH_PROFILE},OFF>>:TFM_FIH_PROFILE_ON>
33)
Raef Coles02a76002021-04-26 12:01:16 +010034
35target_compile_options(tfm_fih_headers
36 INTERFACE
37 $<$<C_COMPILER_ID:GNU>:-Wno-unused-value>
38)