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