mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Improved module definition handling.
This commit is contained in:
parent
54f8dd2f4d
commit
5ee0f18148
@ -156,7 +156,7 @@ list(GET config_args 0 OS)
|
||||
list(GET config_args 1 BOARD)
|
||||
list(GET config_args 2 LABEL)
|
||||
|
||||
message(STATUS "TARGET: OS(${OS})-BOARD(${BOARD})-LABEL(${LABEL})")
|
||||
message(STATUS "OS=${OS} BOARD=${BOARD} LABEL=${LABEL}")
|
||||
|
||||
#=============================================================================
|
||||
# programs
|
||||
|
||||
@ -264,6 +264,11 @@ function(px4_add_module)
|
||||
|
||||
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
|
||||
|
||||
if(MAIN)
|
||||
set_target_properties(${MODULE} PROPERTIES
|
||||
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
|
||||
endif()
|
||||
|
||||
if(INCLUDES)
|
||||
target_include_directories(${MODULE} ${INCLUDES})
|
||||
endif()
|
||||
@ -272,10 +277,6 @@ function(px4_add_module)
|
||||
add_dependencies(${MODULE} ${DEPENDS})
|
||||
endif()
|
||||
|
||||
if(MAIN)
|
||||
target_compile_definitions(${MODULE} PUBLIC -DPX4_MAIN=${MAIN}_app_main)
|
||||
endif()
|
||||
|
||||
# join list variables to get ready to send to compiler
|
||||
foreach(prop LINK_FLAGS COMPILE_FLAGS)
|
||||
if(${prop})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user