[CMAKE]
[reactos.git] / drivers / network / ndis / CMakeLists.txt
1
2 include_directories(BEFORE include)
3
4 add_definitions(-DNDIS_WRAPPER)
5 add_definitions(-DNDIS51)
6 add_definitions(-DNDIS51_MINIPORT)
7 add_definitions(-DNDIS_LEGACY_DRIVER)
8 add_definitions(-DNDIS_LEGACY_MINIPORT)
9 add_definitions(-DNDIS_LEGACY_PROTOCOL)
10 add_definitions(-DNDIS_MINIPORT_DRIVER)
11
12 spec2def(ndis ${CMAKE_CURRENT_SOURCE_DIR}/ndis.spec ${CMAKE_CURRENT_BINARY_DIR}/ndis.def)
13
14 list(APPEND SOURCE
15 ndis/30stubs.c
16 ndis/40stubs.c
17 ndis/50stubs.c
18 ndis/buffer.c
19 ndis/cl.c
20 ndis/cm.c
21 ndis/co.c
22 ndis/config.c
23 ndis/control.c
24 ndis/efilter.c
25 ndis/hardware.c
26 ndis/io.c
27 ndis/main.c
28 ndis/memory.c
29 ndis/miniport.c
30 ndis/misc.c
31 ndis/protocol.c
32 ndis/string.c
33 ndis/time.c
34 ndis.rc)
35
36 add_library(ndis SHARED ${CMAKE_CURRENT_BINARY_DIR}/ndis_ndissys.h.gch ${SOURCE})
37
38 set_target_properties(ndis PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
39
40 target_link_libraries(ndis
41 ${CMAKE_CURRENT_BINARY_DIR}/ndis.def
42 -lntoskrnl
43 -lhal)
44
45 add_pch(ndis ${CMAKE_CURRENT_SOURCE_DIR}/include/ndissys.h ${SOURCE})
46 add_dependencies(ndis ndis_def psdk bugcodes buildno_header)
47 add_cab_target(ndis 2)