Initial import of firmware and host projects
This commit is contained in:
24
modules/ip5306/sysbuild/CMakeLists.txt
Normal file
24
modules/ip5306/sysbuild/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
function(ip5306_pre_image_cmake)
|
||||
if(NOT CMAKE_HOST_WIN32)
|
||||
return()
|
||||
endif()
|
||||
|
||||
cmake_parse_arguments(HOOK "" "IMAGE" "IMAGES" ${ARGN})
|
||||
|
||||
if(NOT DEFINED HOOK_IMAGE OR NOT TARGET ${HOOK_IMAGE})
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Device Guard blocks arm-zephyr-eabi-ranlib.exe on this host. Build indexed
|
||||
# archives in a single ar invocation so child images never need ranlib.
|
||||
set(archive_create "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(archive_append "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
|
||||
foreach(lang C CXX ASM)
|
||||
set_property(TARGET ${HOOK_IMAGE} APPEND PROPERTY CMAKE_ARGS
|
||||
"-DCMAKE_${lang}_ARCHIVE_CREATE:STRING=${archive_create}"
|
||||
"-DCMAKE_${lang}_ARCHIVE_APPEND:STRING=${archive_append}"
|
||||
"-DCMAKE_${lang}_ARCHIVE_FINISH:STRING="
|
||||
)
|
||||
endforeach()
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user