You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/13 15:16:36 UTC

(nuttx-apps) 05/08: cmake:bugfix export uORB headers fix compile error

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit d4becc8e46d95a438289cb298aa992c27c981d37
Author: xuxin19 <xu...@xiaomi.com>
AuthorDate: Wed May 1 18:07:40 2024 +0800

    cmake:bugfix export uORB headers fix compile error
    
    Signed-off-by: xuxin19 <xu...@xiaomi.com>
---
 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()