cmake: bsp: add support for specifying bsp bootstrap program
This commit is contained in:
@@ -34,9 +34,6 @@ function(bsp_add_library)
|
||||
COMMAND ${Python_EXECUTABLE} ${bsp_tool}
|
||||
add-binary ${bsp_manifest} ${target_name}
|
||||
${arg_LIB_DIR} $<TARGET_FILE:${target_name}>
|
||||
COMMAND ${Python_EXECUTABLE} ${bsp_tool}
|
||||
add-headers ${bsp_manifest} ${target_name}
|
||||
${arg_HEADER_DIR} ${header_dirs}
|
||||
COMMENT "Preparing bsp component: ${target_name}"
|
||||
DEPENDS ${target_name} ${serialiser})
|
||||
|
||||
@@ -75,7 +72,7 @@ endfunction(bsp_add_program)
|
||||
|
||||
function(bsp_finalise)
|
||||
set(options)
|
||||
set(one_value_args BSP_NAME)
|
||||
set(one_value_args BOOTSTRAP_PROGRAM DEST_DIR BSP_NAME)
|
||||
set(multi_value_args)
|
||||
|
||||
cmake_parse_arguments(PARSE_ARGV 0 arg
|
||||
@@ -83,13 +80,12 @@ function(bsp_finalise)
|
||||
"${one_value_args}"
|
||||
"${multi_value_args}")
|
||||
|
||||
set(bsp_output_path ${CMAKE_CURRENT_BINARY_DIR}/${arg_BSP_NAME})
|
||||
set(bsp_output_path ${arg_DEST_DIR}/${arg_BSP_NAME})
|
||||
get_property(bsp_targets GLOBAL PROPERTY bsp_target_list)
|
||||
add_custom_command(OUTPUT ${bsp_output_path}
|
||||
COMMAND ${Python_EXECUTABLE} ${bsp_tool}
|
||||
build-bsp ${bsp_manifest} ${bsp_output_path}
|
||||
DEPENDS ${bsp_targets}
|
||||
COMMENT "Building bsp: ${arg_BSP_NAME}")
|
||||
add_custom_target(bsp
|
||||
DEPENDS ${bsp_output_path})
|
||||
COMMAND ${Python_EXECUTABLE} ${bsp_tool}
|
||||
build-bsp ${bsp_manifest}
|
||||
$<TARGET_FILE:${arg_BOOTSTRAP_PROGRAM}> ${bsp_output_path}
|
||||
DEPENDS ${bsp_targets} ${arg_BOOTSTRAP_PROGRAM}
|
||||
COMMENT "Building bsp: ${arg_BSP_NAME}")
|
||||
endfunction(bsp_finalise)
|
||||
|
||||
Reference in New Issue
Block a user