From 694cfcfe57a58dc77bcd7bfe61a5fb4f7b0c4cb8 Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Thu, 26 Dec 2019 10:30:37 +0800 Subject: [PATCH] fix(esp-wolfssl): fix esp-wolfssl cmake compiling error --- components/esp-wolfssl/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/esp-wolfssl/CMakeLists.txt b/components/esp-wolfssl/CMakeLists.txt index a215a589..6f9488af 100644 --- a/components/esp-wolfssl/CMakeLists.txt +++ b/components/esp-wolfssl/CMakeLists.txt @@ -9,8 +9,13 @@ endif() register_component() if(CONFIG_ESP_WOLFSSL_INTERNAL) -target_compile_options(${COMPONENT_NAME} PUBLIC -DWOLFSSL_USER_SETTINGS) +target_compile_options(${COMPONENT_LIB} PUBLIC -DWOLFSSL_USER_SETTINGS) -target_link_libraries(${COMPONENT_NAME} "-L ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/lib") -target_link_libraries(${COMPONENT_NAME} wolfssl) +target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/lib") + +if(CONFIG_WOLFSSL_DEBUG) +target_link_libraries(${COMPONENT_LIB} PUBLIC "wolfssl_debug") +else() +target_link_libraries(${COMPONENT_LIB} PUBLIC "wolfssl") +endif() endif()