diff options
author | Patrick Cook <114708437+cookpate@users.noreply.github.com> | 2023-07-11 01:08:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 01:08:59 +0300 |
commit | 18e293723929da31c0395fb4c7f9187474058a6a (patch) | |
tree | 23e5b04077b6cb7f089fa1377ff7b63ad9a3ed6d /CMakeLists.txt | |
parent | 77ec05e641ab602004aaa7b6e7118df8a78f4d2e (diff) |
Fix circular dependency in CMake project (#700)
* Fix circular dependency in cmake project
Fix for https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/687
In order for custom ports to also break the cycle, they must link
against freertos_kernel_include instead of freertos_kernel.
* Simplify include path
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 46a9e1807..a68b652ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,7 +225,7 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_ " .)\n" " target_link_libraries(freertos_kernel_port\n" " PRIVATE\n" - " freertos_kernel)") + " freertos_kernel_include)") endif() ######################################################################## @@ -264,6 +264,7 @@ add_compile_options( ######################################################################## +add_subdirectory(include) add_subdirectory(portable) add_library(freertos_kernel STATIC @@ -279,17 +280,10 @@ add_library(freertos_kernel STATIC $<IF:$<BOOL:$<FILTER:${FREERTOS_HEAP},EXCLUDE,^[1-5]$>>,${FREERTOS_HEAP},portable/MemMang/heap_${FREERTOS_HEAP}.c> ) -target_include_directories(freertos_kernel - PUBLIC - include - # Note: DEPRECATED but still supported, may be removed in a future release. - $<$<NOT:$<TARGET_EXISTS:freertos_config>>:${FREERTOS_CONFIG_FILE_DIRECTORY}> -) - target_link_libraries(freertos_kernel PUBLIC - $<$<TARGET_EXISTS:freertos_config>:freertos_config> freertos_kernel_port + freertos_kernel_include ) ######################################################################## |