fix(esp-wolfssl): fix esp-wolfssl cmake compiling error
@@ -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()
