Give lwIP a top-level CMakeLists.txt

(as it is common in other projects)
This breaks iteropts.sh for now
This commit is contained in:
Dirk Ziegelmeier 2018-10-08 20:57:06 +02:00
parent abcf42b655
commit 2124becd04
5 changed files with 20 additions and 31 deletions

12
.vscode/tasks.json vendored
View File

@ -13,10 +13,10 @@
"isDefault": true
},
"linux": {
"command": "cd ${workspaceFolder}/contrib/ports/unix/example_app/build && cmake --build ."
"command": "cd ${workspaceFolder}/build && cmake --build ."
},
"windows": {
"command": "cd ${workspaceFolder}/contrib/ports/win32/example_app/build; cmake --build ."
"command": "cd ${workspaceFolder}/build; cmake --build ."
}
},
{
@ -25,10 +25,10 @@
"problemMatcher": "$gcc",
"group": "build",
"linux": {
"command": "cd ${workspaceFolder}/contrib/ports/unix/example_app && mkdir build && cd build && cmake .."
"command": "cd ${workspaceFolder} && mkdir build && cd build && cmake .."
},
"windows": {
"command": "cd ${workspaceFolder}/contrib/ports/win32/example_app; mkdir build; cd build; cmake .."
"command": "cd ${workspaceFolder}; mkdir build; cd build; cmake .."
}
},
{
@ -37,10 +37,10 @@
"problemMatcher": [],
"group": "none",
"linux": {
"command": "cd ${workspaceFolder}/contrib/ports/unix/example_app/build && cmake --build . --target lwipdocs"
"command": "cd ${workspaceFolder}/build && cmake --build . --target lwipdocs"
},
"windows": {
"command": "cd ${workspaceFolder}/contrib/ports/win32/example_app/build; cmake --build . --target lwipdocs"
"command": "cd ${workspaceFolder}/build; cmake --build . --target lwipdocs"
},
}
]

View File

@ -2,10 +2,19 @@ cmake_minimum_required(VERSION 3.7)
project(lwIP)
# Example lwIP application
set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include(src/Filelists.cmake)
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
# Package generation
set (LWIP_DEFINITIONS LWIP_DEBUG=1)
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
add_subdirectory(${LWIP_CONTRIB_DIR}/ports/win32/example_app)
else()
add_subdirectory(${LWIP_CONTRIB_DIR}/ports/unix/example_app)
endif()
# Source package generation
set(CPACK_SOURCE_GENERATOR "ZIP")
set(CPACK_SOURCE_PACKAGE_DESCRIPTION_SUMMARY "lwIP lightweight IP stack")
set(CPACK_PACKAGE_VERSION_MAJOR "${LWIP_VERSION_MAJOR}")

View File

@ -13,12 +13,12 @@ if(EXISTS ${MBEDTLSDIR}/CMakeLists.txt)
# Prevent building MBEDTLS programs and tests
set(ENABLE_PROGRAMS OFF CACHE BOOL "")
set(ENABLE_TESTING OFF CACHE BOOL "")
# mbedtls uses cmake. Sweet!
add_subdirectory(${MBEDTLSDIR} mbedtls)
set (LWIP_MBEDTLS_DEFINITIONS
-DLWIP_HAVE_MBEDTLS=1
LWIP_HAVE_MBEDTLS=1
)
set (LWIP_MBEDTLS_INCLUDE_DIRS
${MBEDTLSDIR}/include

View File

@ -1,13 +1,3 @@
cmake_minimum_required(VERSION 3.8)
project(example_app C)
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set (LWIP_DEFINITIONS -DLWIP_DEBUG)
set (LWIP_INCLUDE_DIRS
"${LWIP_DIR}/src/include"
"${LWIP_CONTRIB_DIR}/"
@ -28,4 +18,4 @@ target_link_libraries(example_app ${LWIP_SANITIZER_LIBS} lwipcontribexamples lwi
add_executable(makefsdata ${lwipmakefsdata_SRCS})
target_compile_options(makefsdata PRIVATE ${LWIP_COMPILER_FLAGS})
target_include_directories(makefsdata PRIVATE ${LWIP_INCLUDE_DIRS})
target_link_libraries(makefsdata ${LWIP_SANITIZER_LIBS})
target_link_libraries(makefsdata ${LWIP_SANITIZER_LIBS})

View File

@ -1,13 +1,3 @@
cmake_minimum_required(VERSION 3.8)
project(example_app C)
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set (LWIP_DEFINITIONS -DLWIP_DEBUG)
set (LWIP_INCLUDE_DIRS
"${LWIP_DIR}/src/include"
"${LWIP_CONTRIB_DIR}/"