mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 10:54:06 +08:00
Move find of STRIP_TOOL to toolchain
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
This commit is contained in:
parent
a50a87928f
commit
3dd32492de
@ -18,6 +18,8 @@ foreach(tool echo grep rm mkdir nm cp touch make unzip)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
FIND_PROGRAM(STRIP_TOOL "arm-linux-gnueabihf-strip")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
|
||||
#set(CMAKE_C_FLAGS ${C_FLAGS})
|
||||
#set(CMAKE_CXX_LINKER_FLAGS ${C_FLAGS})
|
||||
|
||||
@ -140,14 +140,12 @@ install(TARGETS px4 DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/ROMFS DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
|
||||
|
||||
FIND_PROGRAM(STRIP_TOOL "arm-linux-gnueabihf-strip")
|
||||
|
||||
add_custom_target(strip
|
||||
DEPENDS px4.stripped
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT px4.stripped
|
||||
COMMAND arm-linux-gnueabihf-strip -R .comment -R .gnu.version $<TARGET_FILE:px4>
|
||||
COMMAND ${STRIP_TOOL} -R .comment -R .gnu.version $<TARGET_FILE:px4>
|
||||
DEPENDS px4)
|
||||
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user