Skip to content

Commit 7925d55

Browse files
committed
Merge branch 'chore/add_cmake_script_for_ssl' into 'master'
feat(ssl): Add cmake script See merge request sdk/ESP8266_RTOS_SDK!132
2 parents c2e45ed + 21c9285 commit 7925d55

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

components/ssl/CMakeLists.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
if(CONFIG_SSL_USING_WOLFSSL)
3+
set(COMPONENT_ADD_INCLUDEDIRS include wolfssl/include)
4+
else()
5+
if(CONFIG_SSL_USING_MBEDTLS)
6+
set(COMPONENT_ADD_INCLUDEDIRS
7+
openssl/include
8+
mbedtls/mbedtls/include
9+
mbedtls/port/include)
10+
11+
set(COMPONENT_PRIV_INCLUDEDIRS
12+
openssl/include/internal
13+
openssl/include/openssl
14+
openssl/include/platform)
15+
16+
set(COMPONENT_SRCDIRS
17+
openssl/source/library
18+
openssl/source/platform
19+
mbedtls/mbedtls/library
20+
mbedtls/port)
21+
else()
22+
set(COMPONENT_ADD_INCLUDEDIRS include axtls/include)
23+
24+
set(COMPONENT_SRCDIRS axtls/source/ssl axtls/source/crypto)
25+
endif()
26+
endif()
27+
28+
set(COMPONENT_REQUIRES lwip esp8266)
29+
30+
register_component()
31+
32+
if(CONFIG_SSL_USING_WOLFSSL)
33+
target_compile_options(${COMPONENT_NAME} PUBLIC -DWOLFSSL_USER_SETTINGS)
34+
35+
target_link_libraries(ssl "-L ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/lib")
36+
target_link_libraries(ssl wolfssl)
37+
else()
38+
if(CONFIG_SSL_USING_MBEDTLS)
39+
target_compile_options(${COMPONENT_NAME} PUBLIC -DMBEDTLS_CONFIG_FILE="esp_config.h")
40+
endif()
41+
endif()

0 commit comments

Comments
 (0)