Compare commits

...

6 Commits

Author SHA1 Message Date
Matt Ihnen
69abe9b05e
Merge 94d687d9e5 into 86c9f79991 2024-05-17 11:10:43 +08:00
jeans
86c9f79991 refactor: added apple macro for fs handling 2024-05-14 13:53:42 +02:00
jeans
8e1a247c1f refactor: added macOS include file
MacOS supports util.h as well
2024-05-14 13:53:42 +02:00
Matt Ihnen
94d687d9e5 Update option description to indicate linux instead of unix as per PR feedback. 2024-03-20 10:04:53 -05:00
Matt Ihnen
0382126c8a Keep "option" lower case to be consistent with the rest of the cmake files. 2024-03-06 21:28:14 -06:00
Matt Ihnen
8cc1671db2 Add ability to disable example apps 2024-03-06 21:21:14 -06:00
3 changed files with 13 additions and 7 deletions

View File

@ -9,12 +9,18 @@ set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set (LWIP_DEFINITIONS LWIP_DEBUG=1)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
option(LWIP_OPTION_ENABLE_EXAMPLE_APPS "Build example apps on win32/linux/darwin" ON)
if (LWIP_OPTION_ENABLE_EXAMPLE_APPS)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
add_subdirectory(${LWIP_DIR}/contrib/ports/win32/example_app)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
add_subdirectory(${LWIP_DIR}/contrib/ports/unix/example_app)
else()
else()
message(WARNING "Host ${CMAKE_SYSTEM_NAME} is not supported to build example_app")
endif()
else()
message(STATUS "example_app build disabled")
endif()
# Source package generation

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include <stdio.h>
#if defined(LWIP_UNIX_OPENBSD)
#if defined(LWIP_UNIX_OPENBSD) || defined(LWIP_UNIX_MACH)
#include <util.h>
#endif
#include <termios.h>

View File

@ -77,7 +77,7 @@ static int deflate_level; /* default compression level, can be changed via comma
#define CHDIR(path) SetCurrentDirectoryA(path)
#define CHDIR_SUCCEEDED(ret) (ret == TRUE)
#elif __linux__
#elif __linux__ || __APPLE__
#define GETCWD(path, len) getcwd(path, len)
#define GETCWD_SUCCEEDED(ret) (ret != NULL)