Restructure CMake build system a bit

This should be easier to use for application devlopers
This commit is contained in:
Dirk Ziegelmeier 2018-10-08 21:18:18 +02:00
parent cba4e1f2a7
commit a6dc31433e
7 changed files with 17 additions and 6 deletions

View File

@ -4,14 +4,13 @@ project(lwIP)
# Example lwIP application
set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set (LWIP_DEFINITIONS LWIP_DEBUG=1)
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
add_subdirectory(${LWIP_CONTRIB_DIR}/ports/win32/example_app)
add_subdirectory(${LWIP_DIR}/contrib/ports/win32/example_app)
else()
add_subdirectory(${LWIP_CONTRIB_DIR}/ports/unix/example_app)
add_subdirectory(${LWIP_DIR}/contrib/ports/unix/example_app)
endif()
# Source package generation

View File

@ -5,11 +5,13 @@
#
# This file is NOT designed (on purpose) to be used as cmake
# subdir via add_subdirectory()
# The intention is to provide greater flexibility to users to
# The intention is to provide greater flexibility to users to
# create their own targets using the *_SRCS variables.
include_guard(GLOBAL)
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set(lwipcontribexamples_SRCS
${LWIP_CONTRIB_DIR}/examples/httpd/fs_example/fs_example.c
${LWIP_CONTRIB_DIR}/examples/httpd/ssi_example/ssi_example.c

View File

@ -5,11 +5,13 @@
#
# This file is NOT designed (on purpose) to be used as cmake
# subdir via add_subdirectory()
# The intention is to provide greater flexibility to users to
# The intention is to provide greater flexibility to users to
# create their own targets using the *_SRCS variables.
include_guard(GLOBAL)
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set(lwipcontribportunix_SRCS
${LWIP_CONTRIB_DIR}/ports/unix/port/sys_arch.c
${LWIP_CONTRIB_DIR}/ports/unix/port/perf.c

View File

@ -1,3 +1,5 @@
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set (LWIP_INCLUDE_DIRS
"${LWIP_DIR}/src/include"
"${LWIP_CONTRIB_DIR}/"

View File

@ -5,11 +5,13 @@
#
# This file is NOT designed (on purpose) to be used as cmake
# subdir via add_subdirectory()
# The intention is to provide greater flexibility to users to
# The intention is to provide greater flexibility to users to
# create their own targets using the *_SRCS variables.
include_guard(GLOBAL)
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set(lwipcontribportwindows_SRCS
${LWIP_CONTRIB_DIR}/ports/win32/sys_arch.c
${LWIP_CONTRIB_DIR}/ports/win32/sio.c

View File

@ -1,3 +1,5 @@
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set (LWIP_INCLUDE_DIRS
"${LWIP_DIR}/src/include"
"${LWIP_CONTRIB_DIR}/"

View File

@ -10,6 +10,8 @@
include_guard(GLOBAL)
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake)
set(LWIP_VERSION_MAJOR "2")
set(LWIP_VERSION_MINOR "2")
set(LWIP_VERSION_REVISION "0")