simbit18 commented on code in PR #3444:
URL: https://github.com/apache/nuttx-apps/pull/3444#discussion_r3032091704


##########
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.
+  file(CREATE_LINK ${CMAKE_CURRENT_LIST_DIR}/include/mbedtls/mbedtls_config.h

Review Comment:
   Hi @fdcavalcanti, Perhaps it would be better to use  function
   
   nuttx_create_symlink
   
   https://github.com/apache/nuttx/blob/master/cmake/nuttx_create_symlink.cmake



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to