Fix parameters building for nuttx protected/kernel builds

- Don't link to px4_layer
- Don't link to flashparams; flashparams would work only in kernel side
- Add missing link to px4_platform

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
Jukka Laitinen 2021-01-11 09:59:17 +02:00 committed by Daniel Agar
parent 705171eb53
commit e1f2bff9be

View File

@ -167,7 +167,8 @@ if (NOT "${PX4_BOARD}" MATCHES "px4_io")
px4_parameters.hpp
)
target_link_libraries(parameters PRIVATE perf tinybson px4_layer)
target_link_libraries(parameters PRIVATE perf tinybson px4_platform)
target_compile_definitions(parameters PRIVATE -DMODULE_NAME="parameters")
target_compile_options(parameters
PRIVATE
@ -180,7 +181,7 @@ else()
endif()
add_dependencies(parameters prebuild_targets)
if(${PX4_PLATFORM} STREQUAL "nuttx")
if(${PX4_PLATFORM} STREQUAL "nuttx" AND CONFIG_BUILD_FLAT)
target_link_libraries(parameters PRIVATE flashparams tinybson)
endif()