11# [wolfSSL Project]/CMakeLists.txt
22#
3- # Copyright (C) 2014-2024 wolfSSL Inc.
3+ # Copyright (C) 2014-2025 wolfSSL Inc.
44#
55# This file is part of wolfSSH.
66#
1717# You should have received a copy of the GNU General Public License
1818# along with wolfSSH. If not, see <http://www.gnu.org/licenses/>.
1919#
20- # cmake for WOLFSSH Espressif projects
20+ # cmake for WOLFSSH Espressif projects (echoserver)
2121#
2222# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
2323
@@ -35,6 +35,13 @@ set(WOLFSSL_USER_SETTINGS ON)
3535# Assume we have a ESP_ENABLE_WOLFSSH section in user_settings.h
3636set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DESP_ENABLE_WOLFSSH" )
3737
38+ # Managed wolfSSL Components prior to 5.7.4 need a manual setting for WOLFSSL_WOLFSSH
39+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_WOLFSSH" )
40+
41+ # Optional:
42+ # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSH_TERM")
43+ # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG_WOLFSSH")
44+
3845# The wolfSSL CMake file should be able to find the source code.
3946# Otherwise, assign an environment variable or set it here:
4047#
@@ -54,36 +61,36 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DESP_ENABLE_WOLFSSH")
5461if (WIN32 )
5562 # Windows-specific configuration here
5663 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WINDOWS" )
57- message ("Detected Windows" )
64+ message (STATUS "Detected Windows" )
5865endif ()
5966if (CMAKE_HOST_UNIX )
60- message ("Detected UNIX" )
67+ message (STATUS "Detected UNIX" )
6168endif ()
6269if (APPLE )
63- message ("Detected APPLE" )
70+ message (STATUS "Detected APPLE" )
6471endif ()
6572if (CMAKE_HOST_UNIX AND (NOT APPLE ) AND EXISTS "/proc/sys/fs/binfmt_misc/WSLInterop" )
6673 # Windows-specific configuration here
6774 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WSL" )
68- message ("Detected WSL" )
75+ message (STATUS "Detected WSL" )
6976endif ()
7077if (CMAKE_HOST_UNIX AND (NOT APPLE ) AND (NOT WIN32 ))
7178 # Windows-specific configuration here
7279 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_LINUX" )
73- message ("Detected Linux" )
80+ message (STATUS "Detected Linux" )
7481endif ()
7582if (APPLE )
7683 # Windows-specific configuration here
7784 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_APPLE" )
78- message ("Detected Apple" )
85+ message (STATUS "Detected Apple" )
7986endif ()
8087# End optional WOLFSSL_CMAKE_SYSTEM_NAME
8188
8289# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
8390set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH} /examples/common_components/protocol_examples_common)
8491
8592if (EXISTS "${PROTOCOL_EXAMPLES_DIR} " )
86- message ("Found PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR} " )
93+ message (STATUS "Found PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR} " )
8794 set (EXTRA_COMPONENT_DIRS $ENV{IDF_PATH} /examples/common_components/protocol_examples_common)
8895 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFOUND_PROTOCOL_EXAMPLES_DIR" )
8996else ()
@@ -116,7 +123,7 @@ endif()
116123set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH} /examples/common_components/protocol_examples_common)
117124
118125if (EXISTS "${PROTOCOL_EXAMPLES_DIR} " )
119- message ("Found PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR} " )
126+ message (STATUS "Found PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR} " )
120127 set (EXTRA_COMPONENT_DIRS $ENV{IDF_PATH} /examples/common_components/protocol_examples_common)
121128 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFOUND_PROTOCOL_EXAMPLES_DIR" )
122129else ()
0 commit comments