mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 17:53:34 +08:00
remove BOARD_NAME from board_config.h and set automatically
This commit is contained in:
committed by
David Sidrane
parent
2d052c02fa
commit
ec4c9da253
@@ -233,6 +233,20 @@ function(px4_add_module)
|
||||
|
||||
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_BINARY_DIR}/${MODULE}_unity.cpp)
|
||||
target_include_directories(${MODULE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
if(DEPENDS)
|
||||
# using target_link_libraries for dependencies provides linking
|
||||
# as well as interface include and libraries
|
||||
foreach(dep ${DEPENDS})
|
||||
get_target_property(dep_type ${dep} TYPE)
|
||||
if (${dep_type} STREQUAL "STATIC_LIBRARY")
|
||||
target_link_libraries(${MODULE}_original PRIVATE ${dep})
|
||||
else()
|
||||
add_dependencies(${MODULE}_original ${dep})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
elseif(DYNAMIC AND MAIN AND (${OS} STREQUAL "posix"))
|
||||
add_library(${MODULE} SHARED ${SRCS})
|
||||
target_compile_definitions(${MODULE} PRIVATE ${MAIN}_main=px4_module_main)
|
||||
|
||||
Reference in New Issue
Block a user