Fix: LazyFetch incorrectly setting build type

LazyFetch.cmake passes XXX_BUILD_TYPE as CMAKE_BUILD_TYPE to each
external component which defines a build type. The code is incorrect and
an extra indirection is missing when evaluating the value of the
variable. Thus CMAKE_BUILD_TYPE is set to the variable name instead of
it's value. This problem was not causing in any build or runtime error.

This change adds the missing indirection.

Change-Id: I12e4cd4b35225dc7cef7104cf5f5217017580a36
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/tools/cmake/common/LazyFetch.cmake b/tools/cmake/common/LazyFetch.cmake
index a820919..68e790e 100644
--- a/tools/cmake/common/LazyFetch.cmake
+++ b/tools/cmake/common/LazyFetch.cmake
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -91,7 +91,7 @@
 		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
 		${CMAKE_COMMAND}
 			"-C${CONFIGURED_CACHE_FILE}"
-			-DCMAKE_BUILD_TYPE=${UC_DEP_NAME}_BUILD_TYPE
+			-DCMAKE_BUILD_TYPE=${${UC_DEP_NAME}_BUILD_TYPE}
 			-S ${BUILD_SRC_DIR}
 			-B ${BUILD_BIN_DIR}
 		RESULT_VARIABLE