From d4becc8e46d95a438289cb298aa992c27c981d37 Mon Sep 17 00:00:00 2001 From: xuxin19 Date: Wed, 1 May 2024 18:07:40 +0800 Subject: [PATCH] cmake:bugfix export uORB headers fix compile error Signed-off-by: xuxin19 --- crypto/mbedtls/CMakeLists.txt | 6 +++++- system/uorb/CMakeLists.txt | 27 +++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/crypto/mbedtls/CMakeLists.txt b/crypto/mbedtls/CMakeLists.txt index 03bf85316..e53102e79 100644 --- a/crypto/mbedtls/CMakeLists.txt +++ b/crypto/mbedtls/CMakeLists.txt @@ -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) diff --git a/system/uorb/CMakeLists.txt b/system/uorb/CMakeLists.txt index 4c24f94ca..b890c0ae8 100644 --- a/system/uorb/CMakeLists.txt +++ b/system/uorb/CMakeLists.txt @@ -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()