mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 02:23:34 +08:00
platform: restructure (NuttX) architecture-specific code
updated: tone_alarm, px4io_serial, px4_micro_hal
This commit is contained in:
@@ -183,6 +183,9 @@ function(px4_add_board)
|
||||
set(PX4_PLATFORM ${PLATFORM} CACHE STRING "PX4 board OS" FORCE)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake)
|
||||
|
||||
# platform-specific include path
|
||||
include_directories(${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/src/px4/common/include)
|
||||
|
||||
if(ARCHITECTURE)
|
||||
set(CMAKE_SYSTEM_PROCESSOR ${ARCHITECTURE} CACHE INTERNAL "system processor" FORCE)
|
||||
endif()
|
||||
|
||||
@@ -174,6 +174,7 @@ function(px4_add_common_flags)
|
||||
${PX4_BINARY_DIR}/src/lib
|
||||
${PX4_BINARY_DIR}/src/modules
|
||||
|
||||
${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/src/px4/${PX4_CHIP_MANUFACTURER}/${PX4_CHIP}
|
||||
${PX4_SOURCE_DIR}/src
|
||||
${PX4_SOURCE_DIR}/src/include
|
||||
${PX4_SOURCE_DIR}/src/lib
|
||||
|
||||
@@ -40,7 +40,7 @@ include(px4_base)
|
||||
# Like add_library but with PX4 platform dependencies
|
||||
#
|
||||
function(px4_add_library target)
|
||||
add_library(${target} ${ARGN})
|
||||
add_library(${target} EXCLUDE_FROM_ALL ${ARGN})
|
||||
|
||||
target_compile_definitions(${target} PRIVATE MODULE_NAME="${target}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user