Fix: change libts to export a CMake package
libts install content was not compatible to find_module() which made
using a pre-built libts binary from CMake less than ideal.
This change adds the missing files and updates export and install
commands to make libts generate a proper CMake package.
From now on an external project will be able to use find_module() to
integrate libts into its build.
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
Change-Id: I9e86e02030f6fb3c86af45252110f939cb82670c
diff --git a/components/rpc/common/interface/component.cmake b/components/rpc/common/interface/component.cmake
index d567602..e4b2477 100644
--- a/components/rpc/common/interface/component.cmake
+++ b/components/rpc/common/interface/component.cmake
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -8,11 +8,12 @@
message(FATAL_ERROR "mandatory parameter TGT is not defined.")
endif()
-set_property(TARGET ${TGT} PROPERTY RPC_CALLER_PUBLIC_HEADER_FILES
+set_property(TARGET ${TGT} APPEND PROPERTY PUBLIC_HEADER
"${CMAKE_CURRENT_LIST_DIR}/rpc_caller.h"
"${CMAKE_CURRENT_LIST_DIR}/rpc_status.h"
)
target_include_directories(${TGT} PUBLIC
- "${CMAKE_CURRENT_LIST_DIR}"
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
+ "$<INSTALL_INTERFACE:${TS_ENV}/include>"
)