| 1 |
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) |
| 2 |
|
| 3 |
set (LWIP_INCLUDE_DIRS |
| 4 |
"${LWIP_DIR}/src/include" |
| 5 |
"${LWIP_DIR}/contrib/" |
| 6 |
"${LWIP_DIR}/contrib/ports/unix/port/include" |
| 7 |
"${LWIP_DIR}/contrib/examples/example_app" |
| 8 |
) |
| 9 |
|
| 10 |
include(${LWIP_DIR}/src/Filelists.cmake) |
| 11 |
include(${LWIP_DIR}/contrib/Filelists.cmake) |
| 12 |
include(${LWIP_DIR}/contrib/ports/unix/Filelists.cmake) |
| 13 |
|
| 14 |
if(NOT EXISTS ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h) |
| 15 |
message(WARNING "${LWIP_DIR}/contrib/examples/example_app is missing lwipcfg.h |
| 16 |
Copy ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h.example to ${LWIP_DIR}/contrib/examples/example_app/lwipcfg.h and edit appropriately") |
| 17 |
endif() |
| 18 |
add_executable(example_app ${LWIP_DIR}/contrib/examples/example_app/test.c default_netif.c) |
| 19 |
target_include_directories(example_app PRIVATE ${LWIP_INCLUDE_DIRS}) |
| 20 |
target_compile_options(example_app PRIVATE ${LWIP_COMPILER_FLAGS}) |
| 21 |
target_compile_definitions(example_app PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) |
| 22 |
target_link_libraries(example_app ${LWIP_SANITIZER_LIBS} lwipcontribexamples lwipcontribapps lwipcontribaddons lwipallapps lwipcontribportunix lwipcore lwipmbedtls) |
| 23 |
|
| 24 |
add_executable(makefsdata ${lwipmakefsdata_SRCS}) |
| 25 |
target_compile_options(makefsdata PRIVATE ${LWIP_COMPILER_FLAGS}) |
| 26 |
target_include_directories(makefsdata PRIVATE ${LWIP_INCLUDE_DIRS}) |
| 27 |
target_link_libraries(makefsdata ${LWIP_SANITIZER_LIBS}) |