mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
cmake: add define for module name
This commit is contained in:
@@ -303,6 +303,9 @@ function(px4_add_module)
|
|||||||
if(MAIN)
|
if(MAIN)
|
||||||
set_target_properties(${MODULE} PROPERTIES
|
set_target_properties(${MODULE} PROPERTIES
|
||||||
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
|
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
|
||||||
|
add_definitions(-DMODULE_NAME="${MAIN}")
|
||||||
|
else()
|
||||||
|
add_definitions(-DMODULE_NAME="unknown")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(INCLUDES)
|
if(INCLUDES)
|
||||||
|
|||||||
Reference in New Issue
Block a user