xref: /reactos/sdk/lib/drivers/wdf/CMakeLists.txt (revision 2b933529)
1
2remove_definitions(-D_WIN32_WINNT=0x502)
3
4list(APPEND SOURCE_SHARED
5    shared/core/fxcxdeviceinit.cpp
6    # shared/core/fxcxdeviceinitapi.cpp
7    shared/core/fxdevice.cpp
8    shared/core/fxdeviceapi.cpp
9    shared/core/fxdevicebase.cpp
10    shared/core/fxdevicecontrolapi.cpp
11    shared/core/fxdeviceinit.cpp
12    shared/core/fxdeviceinitapi.cpp
13    shared/core/fxdisposelist.cpp
14    shared/core/fxdriver.cpp
15    shared/core/fxdriverapi.cpp
16    shared/core/fxfileobject.cpp
17    shared/core/fxfileobjectapi.cpp
18    shared/core/fxirpqueue.cpp
19    # shared/core/fxlock.cpp
20    shared/core/fxlookasidelist.cpp
21    shared/core/fxlookasidelistapi.cpp
22    shared/core/fxmemorybuffer.cpp
23    shared/core/fxmemorybufferapi.cpp
24    shared/core/fxmemorybufferfromlookaside.cpp
25    shared/core/fxmemorybufferfrompool.cpp
26    shared/core/fxmemorybufferpreallocated.cpp
27    shared/core/fxmemorybufferpreallocatedapi.cpp
28    shared/core/fxmemoryobject.cpp
29    shared/core/fxpagedlookasidelist.cpp
30    shared/core/fxrequest.cpp
31    shared/core/fxrequestapi.cpp
32    shared/core/fxrequestbase.cpp
33    shared/core/fxrequestcontext.cpp
34    shared/core/fxrequestmemory.cpp
35    shared/core/fxrequestoutputbuffer.cpp
36    shared/core/fxrequestsystembuffer.cpp
37    shared/core/fxsyncrequest.cpp
38    shared/core/fxsystemworkitem.cpp
39    shared/core/fxtimer.cpp
40    shared/core/fxtimerapi.cpp
41    shared/core/fxworkitem.cpp
42    shared/core/fxworkitemapi.cpp
43    # shared/core/verifierapi.cpp
44    shared/irphandlers/default/fxdefaultirphandler.cpp
45    shared/irphandlers/general/fxpkggeneral.cpp
46    shared/irphandlers/io/fxioqueue.cpp
47    shared/irphandlers/io/fxioqueueapi.cpp
48    shared/irphandlers/io/fxpkgio.cpp
49    shared/irphandlers/package/fxpackage.cpp
50    # shared/irphandlers/pnp/devicepwrreqstatemachine.cpp
51    shared/irphandlers/pnp/eventqueue.cpp
52    shared/irphandlers/pnp/fdopower.cpp
53    shared/irphandlers/pnp/fxinterruptapi.cpp
54    shared/irphandlers/pnp/fxpkgfdo.cpp
55    shared/irphandlers/pnp/fxpkgpdo.cpp
56    shared/irphandlers/pnp/fxpkgpnp.cpp
57    shared/irphandlers/pnp/interruptobject.cpp
58    shared/irphandlers/pnp/notpowerpolicyownerstatemachine.cpp
59    shared/irphandlers/pnp/pdopower.cpp
60    shared/irphandlers/pnp/pnpstatemachine.cpp
61    shared/irphandlers/pnp/poweridlestatemachine.cpp
62    shared/irphandlers/pnp/powerpolicystatemachine.cpp
63    shared/irphandlers/pnp/powerstatemachine.cpp
64    shared/irphandlers/pnp/poxinterface.cpp # stubs
65    shared/irphandlers/pnp/selfmanagediostatemachine.cpp
66    shared/irphandlers/pnp/wakeinterruptstatemachine.cpp
67    shared/object/dbgtrace.cpp
68    shared/object/fxobject.cpp
69    shared/object/fxobjectapi.cpp
70    shared/object/fxobjectstatemachine.cpp
71    shared/object/fxtagtracker.cpp
72    shared/object/fxuserobject.cpp
73    shared/object/fxuserobjectapi.cpp
74    shared/object/fxvalidatefunctions.cpp
75    shared/object/fxverifierbugcheck.cpp
76    shared/object/fxverifierlock.cpp
77    shared/object/globals.cpp
78    shared/object/handleapi.cpp
79    shared/object/wdfpool.cpp
80    shared/support/fxcollection.cpp
81    shared/support/fxcollectionapi.cpp
82    # shared/support/fxdeviceinterface.cpp
83    shared/support/fxdeviceinterfaceapi.cpp
84    shared/support/fxdevicetext.cpp
85    shared/support/fxregistryapi.cpp
86    shared/support/fxregkey.cpp
87    shared/support/fxrequestbuffer.cpp
88    shared/support/fxresourceapi.cpp
89    shared/support/fxresourcecollection.cpp
90    shared/support/fxspinlock.cpp
91    shared/support/fxspinlockapi.cpp
92    shared/support/fxstring.cpp
93    shared/support/fxstringapi.cpp
94    # shared/support/fxtelemetry.cpp
95    shared/support/fxtransactionedlist.cpp
96    shared/support/fxwaitlock.cpp
97    shared/support/fxwaitlockapi.cpp
98    shared/support/stringutil.cpp
99    shared/targets/general/fxiotarget.cpp
100    shared/targets/general/fxiotargetapi.cpp
101    shared/targets/general/fxiotargetremote.cpp
102    shared/targets/general/fxiotargetself.cpp
103    # shared/targets/usb/fxusbdevice.cpp
104    # shared/targets/usb/fxusbdeviceapi.cpp
105    # shared/targets/usb/fxusbinterface.cpp
106    # shared/targets/usb/fxusbinterfaceapi.cpp
107    # shared/targets/usb/fxusbpipe.cpp
108    # shared/targets/usb/fxusbpipeapi.cpp
109    # shared/targets/usb/usbutil.cpp
110    )
111
112list(APPEND SOURCE_KM
113    kmdf/src/core/fxbugcheckcallback.cpp
114    kmdf/src/core/fxchildlist.cpp
115    kmdf/src/core/fxchildlistapi.cpp
116    kmdf/src/core/fxdevicefdoapi.cpp
117    kmdf/src/core/fxdevicepdoapi.cpp
118    kmdf/src/core/fxdpc.cpp
119    kmdf/src/core/fxdpcapi.cpp
120    kmdf/src/core/fxsystemthread.cpp
121    # kmdf/src/core/tracing.cpp
122    # kmdf/src/dma/base/fxcommonbuffer.cpp # requires DMA stuff
123    # kmdf/src/dma/base/fxcommonbufferapi.cpp # requires DMA stuff
124    # kmdf/src/dma/base/fxdmaenabler.cpp
125    # kmdf/src/dma/base/fxdmaenablerapi.cpp
126    # kmdf/src/dma/base/fxdmatransaction.cpp
127    # kmdf/src/dma/base/fxdmatransactionapi.cpp
128    # kmdf/src/dynamic/version/version.cpp
129    kmdf/src/fxtosharedinterface/fxobject/fxobjectinfokm.cpp
130    # kmdf/src/irphandlers/wmi/fxwmiapi.cpp
131    # kmdf/src/irphandlers/wmi/fxwmiinstance.cpp
132    # kmdf/src/irphandlers/wmi/fxwmiirphandler.cpp
133    # kmdf/src/irphandlers/wmi/fxwmiprovider.cpp
134    # kmdf/src/librarycommon/fxlibrarycommon.cpp
135    kmdf/src/support/fxqueryinterface.cpp
136    kmdf/src/support/fxqueryinterfaceapi.cpp
137    kmdf/src/support/fxrelateddevice.cpp
138    kmdf/src/support/fxrelateddevicelist.cpp
139    kmdf/src/support/probeandlock.c
140    shared/core/km/fxdeviceapikm.cpp
141    shared/core/km/fxdevicebasekm.cpp
142    shared/core/km/fxdeviceinitkm.cpp
143    shared/core/km/fxdevicekm.cpp
144    shared/core/km/fxdriverapikm.cpp
145    shared/core/km/fxdriverkm.cpp
146    shared/core/km/fxfileobjectapikm.cpp
147    shared/core/km/fxfileobjectkm.cpp
148    shared/core/km/fxnpagedlookasidelistkm.cpp
149    shared/core/km/fxrequestkm.cpp
150    shared/core/km/fxrequestsystembufferkm.cpp
151    shared/irphandlers/io/km/fxioqueuekm.cpp
152    shared/irphandlers/pnp/km/eventqueuekm.cpp
153    shared/irphandlers/pnp/km/fxpkgfdokm.cpp
154    shared/irphandlers/pnp/km/fxpkgpdokm.cpp
155    shared/irphandlers/pnp/km/fxpkgpnpkm.cpp
156    shared/irphandlers/pnp/km/interruptobjectkm.cpp
157    shared/irphandlers/pnp/km/pnpstatemachinekm.cpp
158    shared/irphandlers/pnp/km/powerpolicystatemachinekm.cpp
159    shared/irphandlers/pnp/km/powerstatemachinekm.cpp # stubs
160    # shared/irphandlers/pnp/km/poxinterfacekm.cpp
161    shared/irphandlers/pnp/km/supportkm.cpp
162    shared/object/km/fxobjectkm.cpp
163    shared/object/km/globalskm.cpp
164    shared/object/km/wdfpoolkm.cpp
165    shared/primitives/km/mxgeneralkm.cpp
166    shared/support/km/fxdeviceinterfacekm.cpp
167    shared/support/km/fxregkeykm.cpp
168    shared/support/km/fxrequestbufferkm.cpp
169    shared/support/km/fxresourcecollectionkm.cpp
170    # shared/support/km/fxtelemetrykm.cpp
171    shared/targets/general/fxiotarget.cpp
172    shared/targets/general/fxiotargetapi.cpp
173    shared/targets/general/fxiotargetremote.cpp
174    shared/targets/general/fxiotargetself.cpp
175    shared/targets/general/km/fxiotargetapikm.cpp
176    shared/targets/general/km/fxiotargetkm.cpp
177    shared/targets/general/km/fxiotargetremotekm.cpp
178    reactos_special.cpp
179    )
180
181# add_library(wdf01000 MODULE ${SOURCE})
182
183# set_module_type(wdf01000 kernelmodedriver ENTRYPOINT 0)
184# add_importlibs(wdf01000 ntoskrnl hal wdfldr)
185# add_cd_file(TARGET wdf01000 DESTINATION reactos/system32/drivers FOR all)
186# add_registry_inf(wdf01000_reg.inf)
187
188add_library(wdf01000 ${SOURCE_SHARED} ${SOURCE_KM})
189
190target_compile_definitions(wdf01000
191    PUBLIC WDF_DEVICE_NO_WDMSEC_H _WIN32_WINNT=0x603 NTDDI_VERSION=0x06030000 # NTDDI_WINBLUE
192    PRIVATE FX_CORE_MODE=1 FX_CORE_KERNEL_MODE=1
193    PRIVATE __WDF_MAJOR_VERSION=1 __WDF_MINOR_VERSION=17 __WDF_BUILD_NUMBER=7600)
194
195target_include_directories(wdf01000
196    PUBLIC ${REACTOS_SOURCE_DIR}/sdk/include/wdf/kmdf/1.17
197    PRIVATE
198        shared/inc/primitives/common
199        shared/inc/primitives/km
200        shared/inc/private/common
201        shared/inc/private/km
202        kmdf/inc/private
203        shared/object # fxobjectpch.hpp
204        shared/support # fxsupportpch.hpp
205        shared/core # coreprivshared.hpp
206        shared/irphandlers # irphandlerspriv.hpp
207        shared/irphandlers/pnp # pnppriv.hpp
208        shared/irphandlers/pnp/km # pnpprivkm.hpp
209    )
210
211target_link_libraries(wdf01000 ntoskrnl_vista ${PSEH_LIB})
212
213if(GCC)
214    target_compile_options(wdf01000
215        PRIVATE -Wno-write-strings -Wno-unknown-pragmas -Wno-switch
216        PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-reorder -Wno-invalid-offsetof -Wno-delete-non-virtual-dtor>)
217endif()
218