Skip to content

Commit ae8dd4a

Browse files
committed
crypto/mbedtls: expose include paths as public
Expose include paths as public when using CMake. Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
1 parent d775ac8 commit ae8dd4a

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

crypto/mbedtls/CMakeLists.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,16 @@ if(CONFIG_CRYPTO_MBEDTLS)
129129
# Library Configuration
130130
# ############################################################################
131131

132-
set_property(
133-
TARGET nuttx
134-
APPEND
135-
PROPERTY NUTTX_INCLUDE_DIRECTORIES ${INCDIR})
136-
set_property(
137-
TARGET nuttx
138-
APPEND
139-
PROPERTY NUTTX_CXX_INCLUDE_DIRECTORIES ${INCDIR})
140-
141132
nuttx_add_library(mbedtls STATIC)
142133
target_sources(mbedtls PRIVATE ${CSRCS})
143-
target_include_directories(mbedtls PRIVATE ${INCDIR})
134+
target_include_directories(mbedtls PUBLIC ${INCDIR})
135+
nuttx_export_header(TARGET mbedtls INCLUDE_DIRECTORIES ${MBEDTLS_DIR}/include)
136+
# Overlay mbedtls_config.h cannot be in the same nuttx_export_header() as
137+
# ${MBEDTLS_DIR}/include (duplicate path). Alt headers need no export; INCDIR
138+
# supplies them for this library only.
139+
nuttx_create_symlink(
140+
${CMAKE_CURRENT_LIST_DIR}/include/mbedtls/mbedtls_config.h
141+
${NUTTX_APPS_BINDIR}/include/mbedtls/mbedtls/mbedtls_config.h)
144142
target_compile_definitions(mbedtls PRIVATE unix)
145143

146144
if(CONFIG_ARCH_SIM)

0 commit comments

Comments
 (0)