Line | |
---|
1 | # This file is indended to be included in end-user CMakeLists.txt
|
---|
2 | # include(/path/to/Filelists.cmake)
|
---|
3 | # It assumes the variable LWIP_CONTRIB_DIR is defined pointing to the
|
---|
4 | # root path of lwIP contrib sources.
|
---|
5 | #
|
---|
6 | # This file is NOT designed (on purpose) to be used as cmake
|
---|
7 | # subdir via add_subdirectory()
|
---|
8 | # The intention is to provide greater flexibility to users to
|
---|
9 | # create their own targets using the *_SRCS variables.
|
---|
10 |
|
---|
11 | set(lwipcontribportwindows_SRCS
|
---|
12 | ${LWIP_CONTRIB_DIR}/ports/win32/sys_arch.c
|
---|
13 | ${LWIP_CONTRIB_DIR}/ports/win32/sio.c
|
---|
14 | ${LWIP_CONTRIB_DIR}/ports/win32/pcapif.c
|
---|
15 | ${LWIP_CONTRIB_DIR}/ports/win32/pcapif_helper.c
|
---|
16 | )
|
---|
17 |
|
---|
18 | # pcapif needs WinPcap developer package: https://www.winpcap.org/devel.htm
|
---|
19 | set(WPDPACK_DIR ${LWIP_CONTRIB_DIR}/../WpdPack)
|
---|
20 | find_library(WPCAP wpcap HINTS ${WPDPACK_DIR}/lib)
|
---|
21 | find_library(PACKET packet HINTS ${WPDPACK_DIR}/lib)
|
---|
22 |
|
---|
23 | add_library(lwipcontribportwindows EXCLUDE_FROM_ALL ${lwipcontribportwindows_SRCS})
|
---|
24 | target_include_directories(lwipcontribportwindows PRIVATE ${LWIP_INCLUDE_DIRS} "${WPDPACK_DIR}/include" ${LWIP_MBEDTLS_INCLUDE_DIRS})
|
---|
25 | target_compile_options(lwipcontribportwindows PRIVATE ${LWIP_COMPILER_FLAGS})
|
---|
26 | target_compile_definitions(lwipcontribaddons PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
|
---|
27 | target_link_libraries(lwipcontribportwindows PUBLIC ${WPCAP} ${PACKET} ${LWIP_MBEDTLS_LINK_LIBRARIES})
|
---|
Note:
See
TracBrowser
for help on using the repository browser.