Move libsp mocks into separate component
Enable deployments to include libsp mocks in tests by simply adding
the newly created libsp mock component.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I40805fd49362c6cc71b5b34f9ba888d27ce01ed8
diff --git a/components/messaging/ffa/libsp/mock/component.cmake b/components/messaging/ffa/libsp/mock/component.cmake
new file mode 100644
index 0000000..03b8006
--- /dev/null
+++ b/components/messaging/ffa/libsp/mock/component.cmake
@@ -0,0 +1,27 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+if (NOT DEFINED TGT)
+ message(FATAL_ERROR "mandatory parameter TGT is not defined.")
+endif()
+
+target_sources(${TGT} PRIVATE
+ "${CMAKE_CURRENT_LIST_DIR}/mock_assert.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/mock_ffa_api.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/mock_ffa_internal_api.cpp"
+ "${CMAKE_CURRENT_LIST_DIR}/mock_sp_rxtx.cpp"
+ )
+
+target_include_directories(${TGT}
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}
+ ${CMAKE_CURRENT_LIST_DIR}/../include
+)
+
+target_compile_definitions(${TGT}
+ PUBLIC
+ "ARM64=1"
+)
\ No newline at end of file