Build: Introduce TARGET_PLATFORM_PATH
The TARGET_PLATFORM_PATH refers to the root directory of
target platform to build, for example
"platform/ext/target/arm/mps2/an521".
With the TARGET_PLATFORM_PATH, lots of references to this path with long
paths can be avoided.
Change-Id: Iaa536cac8048de803fc4a002641e066563679722
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index d473ac7..688d1b9 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
@@ -17,8 +17,8 @@
${CMAKE_BINARY_DIR}/generated/interface/include/psa/framework_feature.h
@ONLY)
-if (EXISTS ${CMAKE_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/preload_ns.cmake)
- include(${CMAKE_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/preload_ns.cmake)
+if (EXISTS ${TARGET_PLATFORM_PATH}/preload_ns.cmake)
+ include(${TARGET_PLATFORM_PATH}/preload_ns.cmake)
tfm_toolchain_reload_compiler()
endif()