Build: Refinements for tfm_log CMake library
This patch:
- merges the tfm_log_interface and tfm_log libraries.
tfm_log_interface was used only to expose an include directory.
Targets need that directory now links tfm_log directly.
- changes the tfm_log library from INTERFACE to STATIC.
tfm_log was linked by many other static libraries.
This caused the source file of it (tfm_log_raw.c) being compiled for
multiple times as it is an INTERFACE library.
Changing to STATIC can avoid this issue.
Change-Id: Idac0a03c180aa9d5dd66b4ea425413435f5c765a
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/log/CMakeLists.txt b/log/CMakeLists.txt
index 9860934..e25920d 100644
--- a/log/CMakeLists.txt
+++ b/log/CMakeLists.txt
@@ -6,21 +6,19 @@
#-------------------------------------------------------------------------------
############################# Ns Log ###########################################
-add_library(tfm_log INTERFACE)
-add_library(tfm_log_interface INTERFACE)
+add_library(tfm_log STATIC)
target_sources(tfm_log
- INTERFACE
+ PRIVATE
tfm_log_raw.c
)
-target_include_directories(tfm_log_interface
- INTERFACE
+target_include_directories(tfm_log
+ PUBLIC
.
)
target_link_libraries(tfm_log
- INTERFACE
- tfm_log_interface
+ PRIVATE
platform_common_interface
)