aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorØyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>2020-12-01 15:26:39 +0100
committerDavid Hu <david.hu@arm.com>2020-12-15 13:24:25 +0000
commit1dab74ba8d7b6acbe45dfeac9264a9f1c8c8eb86 (patch)
tree3cafe541e3c663adc8c5bf32bdd38f516521fae2 /cmake
parent5a212ec8141ddf720a328d7a37d49c3b9095158f (diff)
downloadtrusted-firmware-m-1dab74ba8d7b6acbe45dfeac9264a9f1c8c8eb86.tar.gz
Build: Support out-of-tree platforms
Allows -DTFM_PLATFORM to be set to paths outside the TFM tree. e.g. cmake ... -DTFM_PLATFORM=../../../../tfm_platforms/my_platform Note: TFM_PLATFORM currently only accepts paths relative from platform/ext/target Change-Id: I99d194fdee43ffa29da67b22eb79ef5e450c1559 Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/install.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 1fcecc74c..3deee9908 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -8,9 +8,10 @@
# Generate correct filename
string(TOUPPER ${TFM_PLATFORM} TFM_PLATFORM_UPPERCASE)
string(REGEX REPLACE "-" "_" TFM_PLATFORM_UPPERCASE_UNDERSCORE ${TFM_PLATFORM_UPPERCASE})
+string(REGEX REPLACE "^(\\.\\.([\\/\\\\]))+" "EXTERNAL\\2" TFM_PLATFORM_UPPERCASE_UNDERSCORE_NO_PARENT_DIR ${TFM_PLATFORM_UPPERCASE_UNDERSCORE})
install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/
- DESTINATION ${CMAKE_BINARY_DIR}/install/outputs/${TFM_PLATFORM_UPPERCASE_UNDERSCORE}
+ DESTINATION ${CMAKE_BINARY_DIR}/install/outputs/${TFM_PLATFORM_UPPERCASE_UNDERSCORE_NO_PARENT_DIR}
)
set(INTERFACE_INC_DIR ${CMAKE_SOURCE_DIR}/interface/include)