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

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

commit 3591378113d72806e8ca4cb523f8b9bc2d95bdaa
Author: Filipe Cavalcanti <[email protected]>
AuthorDate: Tue Mar 31 21:16:47 2026 -0300

    crypto/mbedtls: expose include paths as public
    
    Expose include paths as public when using CMake.
    
    Signed-off-by: Filipe Cavalcanti <[email protected]>
---
 crypto/mbedtls/CMakeLists.txt | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/crypto/mbedtls/CMakeLists.txt b/crypto/mbedtls/CMakeLists.txt
index 9a80ffab9..478a257bd 100644
--- a/crypto/mbedtls/CMakeLists.txt
+++ b/crypto/mbedtls/CMakeLists.txt
@@ -129,18 +129,16 @@ if(CONFIG_CRYPTO_MBEDTLS)
   # Library Configuration
   # 
############################################################################
 
-  set_property(
-    TARGET nuttx
-    APPEND
-    PROPERTY NUTTX_INCLUDE_DIRECTORIES ${INCDIR})
-  set_property(
-    TARGET nuttx
-    APPEND
-    PROPERTY NUTTX_CXX_INCLUDE_DIRECTORIES ${INCDIR})
-
   nuttx_add_library(mbedtls STATIC)
   target_sources(mbedtls PRIVATE ${CSRCS})
-  target_include_directories(mbedtls PRIVATE ${INCDIR})
+  target_include_directories(mbedtls PUBLIC ${INCDIR})
+  nuttx_export_header(TARGET mbedtls INCLUDE_DIRECTORIES 
${MBEDTLS_DIR}/include)
+  # Overlay mbedtls_config.h cannot be in the same nuttx_export_header() as
+  # ${MBEDTLS_DIR}/include (duplicate path). Alt headers need no export; INCDIR
+  # supplies them for this library only.
+  nuttx_create_symlink(
+    ${CMAKE_CURRENT_LIST_DIR}/include/mbedtls/mbedtls_config.h
+    ${NUTTX_APPS_BINDIR}/include/mbedtls/mbedtls/mbedtls_config.h)
   target_compile_definitions(mbedtls PRIVATE unix)
 
   if(CONFIG_ARCH_SIM)

Reply via email to