cmake: px4_add_module always add module to PX4_MODULE_PATHS so that parameters aren't pruned

This commit is contained in:
Daniel Agar 2021-10-27 12:32:46 -04:00
parent 51abb804ac
commit be5c5856e7
1 changed files with 4 additions and 3 deletions

View File

@ -156,11 +156,12 @@ function(px4_add_module)
if(NOT DYNAMIC)
target_link_libraries(${MODULE} PRIVATE prebuild_targets parameters_interface px4_layer px4_platform systemlib)
set_property(GLOBAL APPEND PROPERTY PX4_MODULE_LIBRARIES ${MODULE})
set_property(GLOBAL APPEND PROPERTY PX4_MODULE_PATHS ${CMAKE_CURRENT_SOURCE_DIR})
px4_list_make_absolute(ABS_SRCS ${CMAKE_CURRENT_SOURCE_DIR} ${SRCS})
set_property(GLOBAL APPEND PROPERTY PX4_SRC_FILES ${ABS_SRCS})
endif()
set_property(GLOBAL APPEND PROPERTY PX4_MODULE_PATHS ${CMAKE_CURRENT_SOURCE_DIR})
px4_list_make_absolute(ABS_SRCS ${CMAKE_CURRENT_SOURCE_DIR} ${SRCS})
set_property(GLOBAL APPEND PROPERTY PX4_SRC_FILES ${ABS_SRCS})
# set defaults if not set
set(MAIN_DEFAULT MAIN-NOTFOUND)
set(STACK_MAIN_DEFAULT 2048)