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/messaging/ffa/libsp/component.cmake b/components/messaging/ffa/libsp/component.cmake
index a21c630..64e8814 100644
--- a/components/messaging/ffa/libsp/component.cmake
+++ b/components/messaging/ffa/libsp/component.cmake
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -21,7 +21,7 @@
"${CMAKE_CURRENT_LIST_DIR}/sp_rxtx.c"
)
-set_property(TARGET ${TGT} PROPERTY PUBLIC_HEADER
+set_property(TARGET ${TGT} APPEND PROPERTY PUBLIC_HEADER
${CMAKE_CURRENT_LIST_DIR}/include/ffa_api.h
${CMAKE_CURRENT_LIST_DIR}/include/ffa_api_defines.h
${CMAKE_CURRENT_LIST_DIR}/include/ffa_api_types.h
@@ -49,5 +49,5 @@
target_include_directories(${TGT}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
- "$<INSTALL_INTERFACE:include>"
+ "$<INSTALL_INTERFACE:${TS_ENV}/include>"
)
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>"
)
diff --git a/components/service/locator/interface/component.cmake b/components/service/locator/interface/component.cmake
index b5aefa3..84a4d75 100644
--- a/components/service/locator/interface/component.cmake
+++ b/components/service/locator/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,10 +8,11 @@
message(FATAL_ERROR "mandatory parameter TGT is not defined.")
endif()
-set_property(TARGET ${TGT} PROPERTY SERVICE_LOCATOR_PUBLIC_HEADER_FILES
+set_property(TARGET ${TGT} APPEND PROPERTY PUBLIC_HEADER
"${CMAKE_CURRENT_LIST_DIR}/service_locator.h"
)
target_include_directories(${TGT} PUBLIC
- "${CMAKE_CURRENT_LIST_DIR}"
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
+ "$<INSTALL_INTERFACE:${TS_ENV}/include>"
)