mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-16 12:34:29 +00:00
Cmake: Create a single static library including port
Modify portable/CMakeLists.txt to create only one static library containing both the common kernel code and kernel port. Change the freertos_kernel_port target from a STATIC library to an OBJECT library and introduce a new freertos_kernel_port_headers INTERFACE library target. --------- Co-authored-by: ABARNAT <ahmed.barnat@actia-engineering.tn> Co-authored-by: Soren Ptak <ptaksoren@gmail.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
@@ -217,16 +217,17 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
|
||||
" port.c\n"
|
||||
" portmacro.h\n"
|
||||
" Where FreeRTOSCustomPort/CMakeLists.txt is a modified version of:\n"
|
||||
" add_library(freertos_kernel_port STATIC)\n"
|
||||
" add_library(freertos_kernel_port OBJECT)\n"
|
||||
" target_sources(freertos_kernel_port\n"
|
||||
" PRIVATE\n"
|
||||
" port.c\n"
|
||||
" portmacro.h)\n"
|
||||
" target_include_directories(freertos_kernel_port\n"
|
||||
" PUBLIC\n"
|
||||
" add_library(freertos_kernel_port_headers INTERFACE)\n"
|
||||
" target_include_directories(freertos_kernel_port_headers INTERFACE \n"
|
||||
" .)\n"
|
||||
" target_link_libraries(freertos_kernel_port\n"
|
||||
" PRIVATE\n"
|
||||
" freertos_kernel_port_headers\n"
|
||||
" freertos_kernel_include)")
|
||||
endif()
|
||||
|
||||
@@ -257,8 +258,11 @@ endif()
|
||||
|
||||
target_link_libraries(freertos_kernel
|
||||
PUBLIC
|
||||
freertos_kernel_port
|
||||
freertos_kernel_include
|
||||
freertos_kernel_port_headers
|
||||
PRIVATE
|
||||
freertos_kernel_port
|
||||
|
||||
)
|
||||
|
||||
########################################################################
|
||||
|
||||
Reference in New Issue
Block a user