From 123a0b584ab7ba831b785a65f6696dd63f21fa66 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 5 Oct 2017 15:03:32 -0400 Subject: [PATCH] cmake fix posix upload targets --- src/firmware/posix/CMakeLists.txt | 9 ++++----- src/lib/version/CMakeLists.txt | 1 + src/modules/uavcanesc/commands/cfg/CMakeLists.txt | 2 +- src/modules/uavcanesc/commands/stat/CMakeLists.txt | 6 ++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/firmware/posix/CMakeLists.txt b/src/firmware/posix/CMakeLists.txt index 3e049635d6..bdf7c384b1 100644 --- a/src/firmware/posix/CMakeLists.txt +++ b/src/firmware/posix/CMakeLists.txt @@ -40,7 +40,7 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior")) px4_add_adb_push(OUT ${UPLOAD_NAME} OS ${OS} BOARD ${BOARD} - FILES ${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME} + FILES $ ${PX4_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config DEPENDS ${APP_NAME} DEST /home/linaro) @@ -65,7 +65,7 @@ elseif ("${BOARD}" STREQUAL "rpi") px4_add_scp_push(OUT ${UPLOAD_NAME} OS ${OS} BOARD ${BOARD} - FILES ${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME} + FILES $ ${RPI_CONFIG_FILES} ${PX4_SOURCE_DIR}/ROMFS DEPENDS ${APP_NAME} @@ -101,7 +101,7 @@ elseif ("${BOARD}" STREQUAL "bebop") OS ${OS} BOARD ${BOARD} FILES $.stripped - DEPENDS ${APP_NAME}.stripped + DEPENDS px4 DEST /usr/bin) elseif ("${BOARD}" STREQUAL "sitl") @@ -141,9 +141,8 @@ 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}) -add_custom_target(strip DEPENDS "${APP_NAME}.stripped") - add_custom_command(OUTPUT ${APP_NAME}.stripped COMMAND ${STRIP_TOOL} -R .comment -R .gnu.version -o $.stripped $ DEPENDS px4 ) +add_custom_target(strip DEPENDS "${APP_NAME}.stripped") diff --git a/src/lib/version/CMakeLists.txt b/src/lib/version/CMakeLists.txt index f39d3c7b9c..40f7228d8c 100644 --- a/src/lib/version/CMakeLists.txt +++ b/src/lib/version/CMakeLists.txt @@ -56,6 +56,7 @@ add_custom_command(OUTPUT ${px4_git_ver_header} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/px_update_git_header.py ${git_dir_path}/HEAD + ${git_dir_path}/index WORKING_DIRECTORY ${PX4_SOURCE_DIR} COMMENT "Generating git hash header" ) diff --git a/src/modules/uavcanesc/commands/cfg/CMakeLists.txt b/src/modules/uavcanesc/commands/cfg/CMakeLists.txt index 36709de5c6..0dd126c55d 100644 --- a/src/modules/uavcanesc/commands/cfg/CMakeLists.txt +++ b/src/modules/uavcanesc/commands/cfg/CMakeLists.txt @@ -39,7 +39,7 @@ px4_add_module( -Wno-deprecated-declarations -O3 SRCS - esc_cfg.cpp + esc_cfg.cpp DEPENDS platforms__common diff --git a/src/modules/uavcanesc/commands/stat/CMakeLists.txt b/src/modules/uavcanesc/commands/stat/CMakeLists.txt index 0c9859579a..2ec3bd9908 100644 --- a/src/modules/uavcanesc/commands/stat/CMakeLists.txt +++ b/src/modules/uavcanesc/commands/stat/CMakeLists.txt @@ -33,17 +33,15 @@ px4_add_module( MODULE modules__uavcanesc__commands__stat - MAIN cfg + MAIN stat STACK_MAIN 1024 COMPILE_FLAGS -Wno-deprecated-declarations -O3 SRCS - esc_stat.cpp - + esc_stat.cpp DEPENDS platforms__common - ) ## vim: set noet ft=cmake fenc=utf-8 ff=unix :