1
2set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lwip)
3set(LWIP_INCLUDE_DIRS
4    ${LWIP_DIR}/src/include
5    ${CMAKE_CURRENT_SOURCE_DIR}/include/lwip
6)
7include(${LWIP_DIR}/src/Filelists.cmake)
8add_dependencies(lwipcore xdk)
9add_subdirectory(ip)
10
11add_definitions(
12    -DNDIS40
13    -D_NTDRIVER_)
14
15spec2def(tcpip.sys tcpip.spec)
16
17list(APPEND SOURCE
18    chew/workqueue.c
19    datalink/lan.c
20    tcpip/ainfo.c
21    tcpip/buffer.c
22    tcpip/cinfo.c
23    tcpip/dispatch.c
24    tcpip/fileobjs.c
25    tcpip/icmp.c
26    tcpip/iinfo.c
27    tcpip/info.c
28    tcpip/lock.c
29    tcpip/main.c
30    tcpip/ninfo.c
31    tcpip/proto.c
32    tcpip/tinfo.c
33    tcpip/wait.c
34    include/lwip/precomp.h)
35
36add_library(tcpip MODULE
37    ${SOURCE}
38    tcpip.rc
39    ${CMAKE_CURRENT_BINARY_DIR}/tcpip.def)
40
41target_include_directories(tcpip BEFORE
42    PRIVATE ${LWIP_INCLUDE_DIRS}
43    PRIVATE include)
44
45target_link_libraries(tcpip ip ${PSEH_LIB})
46set_module_type(tcpip kernelmodedriver)
47add_importlibs(tcpip ndis ntoskrnl hal)
48add_pch(tcpip include/lwip/precomp.h SOURCE)
49add_cd_file(TARGET tcpip DESTINATION reactos/system32/drivers FOR all)
50