cmake:bugfix export uORB headers fix compile error

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2024-05-01 18:07:40 +08:00 committed by Xiang Xiao
parent 0fdab21fd9
commit d4becc8e46
2 changed files with 30 additions and 3 deletions

View File

@ -73,8 +73,12 @@ if(CONFIG_CRYPTO_MBEDTLS)
# Library Configuration
# ############################################################################
set_property(
TARGET nuttx
APPEND
PROPERTY NUTTX_INCLUDE_DIRECTORIES ${INCDIR})
nuttx_add_library(mbedtls STATIC)
nuttx_export_header(TARGET mbedtls INCLUDE_DIRECTORIES ${MBEDTLS_DIR}/include)
target_sources(mbedtls PRIVATE ${CSRCS})
target_include_directories(mbedtls PRIVATE ${INCDIR})
target_compile_definitions(mbedtls PRIVATE unix)

View File

@ -20,22 +20,45 @@
if(CONFIG_UORB)
set_property(
TARGET nuttx
APPEND
PROPERTY NUTTX_INCLUDE_DIRECTORIES ${NUTTX_APPS_DIR}/system/uorb)
nuttx_add_library(uorb STATIC)
file(GLOB_RECURSE CSRCS "sensor/*.c")
list(APPEND CSRCS uORB/uORB.c)
if(CONFIG_UORB_LISTENER)
nuttx_add_application(NAME uorb_listener SRCS listener.c DEPENDS uorb)
nuttx_add_application(
NAME
uorb_listener
PRIORITY
${CONFIG_UORB_PRIORITY}
STACKSIZE
${CONFIG_UORB_STACKSIZE}
MODULE
${CONFIG_UORB}
SRCS
listener.c
DEPENDS
uorb)
endif()
if(CONFIG_UORB_TEST)
nuttx_add_application(
NAME
uorb_unit_test
PRIORITY
${CONFIG_UORB_PRIORITY}
STACKSIZE
${CONFIG_UORB_STACKSIZE}
MODULE
${CONFIG_UORB}
SRCS
test/utility.c
test/unit_test.c
test/utility.c
DEPENDS
uorb)
endif()