aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 735586ccf5..fc9605ea25 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,13 @@ set(TFM_VERSION 1.2.0)
############################ CONFIGURATION #####################################
+if (IS_ABSOLUTE "${TFM_PLATFORM}")
+ file(RELATIVE_PATH TFM_PLATFORM_RELATIVE_PATH
+ "${CMAKE_CURRENT_SOURCE_DIR}/platform/ext/target"
+ ${TFM_PLATFORM})
+ set(TFM_PLATFORM "${TFM_PLATFORM_RELATIVE_PATH}" CACHE STRING "Target platform set as an absolute path." FORCE)
+endif()
+
# Some compiler flags depend on the CPU / platform config. This include should
# be run before the toolchain file so the compiler can be configured properly.
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/platform/ext/target/${TFM_PLATFORM}/preload.cmake)