libpsats: fix build time include path installed
Libpsats install content refers to a build time include path, which
breaks install content portability. Any project using the installed
package on a machine where TS source is not available at the same path
as on the build machine will fail to compile, due to missing "trace.h".
As a fix use the INSTALL_INTERFACE and BUILD_INTERFACE generators and
differentiate build-time and installed include paths.
Change-Id: I3f2a550ee046e5e3687612c3580bfdcbb31b855b
Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com>
diff --git a/components/common/trace/component.cmake b/components/common/trace/component.cmake
index c591832..9964c84 100644
--- a/components/common/trace/component.cmake
+++ b/components/common/trace/component.cmake
@@ -12,7 +12,8 @@
target_include_directories(${TGT}
PUBLIC
- "${CMAKE_CURRENT_LIST_DIR}/include"
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<INSTALL_INTERFACE:${TS_ENV}/include>
)
target_sources(${TGT} PRIVATE