mirror of
https://github.com/apache/nuttx.git
synced 2026-03-23 14:05:12 +08:00
cmake(enhance):enhance NuttX cmake target dependencies and link_library modules
Enhance CMake's add_dependencies for Nuttx so that different targets can call dependencies without errors when they are not traversed. In addition, since we do not call link_library directly, we increment nuttx_link_library to inherit the PUBLIC property Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
@@ -365,6 +365,10 @@ nuttx_export_kconfig(${CMAKE_BINARY_DIR}/.config)
|
||||
include(nuttx_generate_headers)
|
||||
include(nuttx_generate_outputs)
|
||||
include(nuttx_add_library)
|
||||
|
||||
# add NuttX CMake extenstion after nuttx_add_library
|
||||
include(nuttx_extensions)
|
||||
|
||||
include(nuttx_add_application)
|
||||
include(nuttx_add_romfs)
|
||||
include(nuttx_add_symtab)
|
||||
@@ -378,9 +382,6 @@ include(menuconfig)
|
||||
include(ExternalProject)
|
||||
include(FetchContent)
|
||||
|
||||
# add NuttX CMake extenstion at last
|
||||
include(nuttx_extensions)
|
||||
|
||||
set(FETCHCONTENT_QUIET OFF)
|
||||
|
||||
# Board common directory #####################################################
|
||||
@@ -582,6 +583,9 @@ if(NOT CONFIG_BUILD_KERNEL)
|
||||
|
||||
endif()
|
||||
|
||||
# after we traverse all build directories unify all target dependencies
|
||||
process_all_target_dependencies()
|
||||
|
||||
# Link step ##################################################################
|
||||
|
||||
# Get linker script to use
|
||||
|
||||
Reference in New Issue
Block a user