Add ms-tpm external component
Add external component for ms-tpm-20-ref repo [1]. The commit contains
patch files for ms-tpm to add MbedTLS backend support, Trusted Services
platform support, and a minimal CMake build system so ms-tpm can be
easily integrated using LazyFetch.
[1] https://github.com/microsoft/ms-tpm-20-ref.git
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Change-Id: I6d7bff614f4239f97791100508506325d1727580
diff --git a/external/ms_tpm/ms_tpm-init-cache.cmake.in b/external/ms_tpm/ms_tpm-init-cache.cmake.in
new file mode 100644
index 0000000..ca17282
--- /dev/null
+++ b/external/ms_tpm/ms_tpm-init-cache.cmake.in
@@ -0,0 +1,19 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+set(CMAKE_INSTALL_PREFIX @BUILD_INSTALL_DIR@ CACHE STRING "")
+set(CMAKE_TOOLCHAIN_FILE @TS_EXTERNAL_LIB_TOOLCHAIN_FILE@ CACHE STRING "")
+
+set(TPM_EXTRA_DEFINITIONS @TPM_EXTRA_DEFINITIONS@ CACHE STRING "Defines coming from Trusted Services")
+set(TPM_EXTRA_INCLUDES @TPM_EXTRA_INCLUDES@ CACHE STRING "Include paths coming from Trusted Services")
+
+string(TOUPPER @CMAKE_CROSSCOMPILING@ CMAKE_CROSSCOMPILING) # CMake expects TRUE
+if (CMAKE_CROSSCOMPILING)
+ set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "")
+endif()
+
+@_cmake_fragment@