Build: Compile connection based psa ns api when necessary
When there is any connection based service, tfm_psa_ns_connection_api.c
needs to be compiled.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I0d74b1605b7979ddc33f04df0d48d96d8807d7d9
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index c0146a4..603fcc8 100755
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -115,6 +115,7 @@
target_sources(tfm_api_ns PRIVATE
$<$<BOOL:${CONFIG_TFM_USE_TRUSTZONE}>:${INTERFACE_SRC_DIR}/tfm_psa_ns_api.c>
+ $<$<AND:$<BOOL:${CONFIG_TFM_USE_TRUSTZONE}>,$<BOOL:${CONFIG_TFM_CONNECTION_BASED_SERVICE_API}>>:${INTERFACE_SRC_DIR}/tfm_psa_ns_connection_api.c>
# NS specific implementation of NS interface dispacther
$<$<BOOL:${CONFIG_TFM_USE_TRUSTZONE}>:${CMAKE_CURRENT_SOURCE_DIR}/tfm_ns_interface.c>
)