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/cmake/install.cmake b/cmake/install.cmake
index 36c7f7f..486d9c9 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -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.
#
@@ -200,6 +200,6 @@
##################### Platform-specific installation ###########################
-if (EXISTS ${CMAKE_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/install.cmake)
- include(platform/ext/target/${TFM_PLATFORM}/install.cmake)
+if (EXISTS ${TARGET_PLATFORM_PATH}/install.cmake)
+ include(${TARGET_PLATFORM_PATH}/install.cmake)
endif()