refactor: use cmake macros to do objcopy, install and tests
All checks were successful
All checks were successful
This commit is contained in:
parent
f6c3a13e7f
commit
8630fe7667
12 changed files with 64 additions and 54 deletions
|
@ -4,10 +4,5 @@ add_executable(hello
|
|||
target_include_directories(hello PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
target_link_libraries(hello PRIVATE am-${ARCH} klib)
|
||||
|
||||
|
||||
# -- Extract binary file from ELF
|
||||
add_custom_command(TARGET hello
|
||||
COMMAND ${CMAKE_OBJCOPY} ARGS -S --set-section-flags .bss=alloc,contents -O binary hello hello.bin)
|
||||
|
||||
install(TARGETS hello RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/am-kernels)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hello.bin DESTINATION ${CMAKE_INSTALL_DATADIR}/am-kernels)
|
||||
create_binary(hello)
|
||||
install_target_and_binary(hello)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue