Build: Convert lib dir to modern cmake

Rewrite cmake files inside the lib directory. Adds subdirectories for
external dependencies that are now fetched automatically by cmake. Add
patches for external repos that require them.

WARNING: This change will not build in isolation, it requires _all_
other cmake changes to successfully build. It is split out only for
clarity of changes.

Change-Id: I545fd9278fbccb56c4216ffd5a390e35787dc41a
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/lib/ext/CMakeLists.txt b/lib/ext/CMakeLists.txt
new file mode 100644
index 0000000..569ed2e
--- /dev/null
+++ b/lib/ext/CMakeLists.txt
@@ -0,0 +1,16 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/lib/ext CACHE STRING "" FORCE)
+
+add_subdirectory(qcbor)
+add_subdirectory(t_cose)
+add_subdirectory(mbedcrypto)
+add_subdirectory(tf-m-tests)
+add_subdirectory(mcuboot)
+if(TEST_PSA_API)
+    add_subdirectory(psa_arch_tests)
+endif()