ef2042f86209ec216d22e305eae6a99633778624
[reactos.git] / win32ss / CMakeLists.txt
1
2 set(USE_DIBLIB FALSE)
3
4 # Give WIN32 subsystem its own project.
5 PROJECT(WIN32SS)
6
7 add_subdirectory(drivers)
8
9 if(USE_DIBLIB)
10 add_subdirectory(gdi/diblib)
11 endif()
12
13 add_subdirectory(gdi/gdi32)
14 add_subdirectory(reactx)
15 add_subdirectory(user/consrv)
16 add_subdirectory(user/user32)
17 add_subdirectory(user/win32csr)
18
19 spec2def(win32k.sys win32k.spec ADD_IMPORTLIB)
20
21 include_directories(
22 .
23 include
24 ${REACTOS_SOURCE_DIR}/ntoskrnl/include
25 ${REACTOS_SOURCE_DIR}/lib/3rdparty/freetype/include
26 ${REACTOS_SOURCE_DIR}/include/reactos/subsys
27 ${REACTOS_SOURCE_DIR}/include/reactos/drivers)
28
29 add_definitions(
30 -DLANGPACK
31 -D_WIN32K_)
32
33 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gdi/dib)
34
35 list(APPEND GENDIB_FILES
36 ${CMAKE_CURRENT_BINARY_DIR}/gdi/dib/dib8gen.c
37 ${CMAKE_CURRENT_BINARY_DIR}/gdi/dib/dib16gen.c
38 ${CMAKE_CURRENT_BINARY_DIR}/gdi/dib/dib32gen.c)
39
40 add_custom_command(
41 OUTPUT ${GENDIB_FILES}
42 COMMAND native-gendib ${CMAKE_CURRENT_BINARY_DIR}/gdi/dib
43 DEPENDS native-gendib)
44
45 list(APPEND SOURCE
46 gdi/dib/alphablend.c
47 gdi/dib/dib1bpp.c
48 gdi/dib/dib4bpp.c
49 gdi/dib/dib8bpp.c
50 gdi/dib/dib16bpp.c
51 gdi/dib/dib24bpp.c
52 gdi/dib/dib32bpp.c
53 gdi/dib/floodfill.c
54 gdi/dib/stretchblt.c
55 gdi/eng/alphablend.c
56 gdi/eng/bitblt.c
57 gdi/eng/engbrush.c
58 gdi/eng/engevent.c
59 gdi/eng/clip.c
60 gdi/eng/debug.c
61 gdi/eng/device.c
62 gdi/eng/driverobj.c
63 gdi/eng/error.c
64 gdi/eng/float.c
65 gdi/eng/gradient.c
66 gdi/eng/lineto.c
67 gdi/eng/ldevobj.c
68 gdi/eng/mapping.c
69 gdi/eng/mem.c
70 gdi/eng/engmisc.c
71 gdi/eng/mouse.c
72 gdi/eng/paint.c
73 gdi/eng/pdevobj.c
74 gdi/eng/perfcnt.c
75 gdi/eng/rlecomp.c
76 gdi/eng/semaphor.c
77 gdi/eng/sort.c
78 gdi/eng/string.c
79 gdi/eng/stretchblt.c
80 gdi/eng/surface.c
81 gdi/eng/transblt.c
82 gdi/eng/engwindow.c
83 gdi/eng/xlateobj.c
84 user/ntuser/main.c
85 user/ntuser/misc/file.c
86 user/ntuser/misc/math.c
87 user/ntuser/misc/rtlstr.c
88 user/ntuser/misc/copy.c
89 user/ntuser/misc/registry.c
90 user/ntuser/misc/usrheap.c
91 reactx/ntddraw/ddraw.c
92 reactx/ntddraw/dd.c
93 reactx/ntddraw/ddsurf.c
94 reactx/ntddraw/d3d.c
95 reactx/ntddraw/dvp.c
96 reactx/ntddraw/mocomp.c
97 reactx/ntddraw/eng.c
98 reactx/ntddraw/dxeng.c
99 user/ntuser/accelerator.c
100 user/ntuser/callback.c
101 user/ntuser/callproc.c
102 user/ntuser/caret.c
103 user/ntuser/class.c
104 user/ntuser/clipboard.c
105 user/ntuser/csr.c
106 user/ntuser/cursoricon.c
107 user/ntuser/defwnd.c
108 user/ntuser/desktop.c
109 user/ntuser/display.c
110 user/ntuser/event.c
111 user/ntuser/focus.c
112 user/ntuser/guicheck.c
113 user/ntuser/hook.c
114 user/ntuser/hotkey.c
115 user/ntuser/input.c
116 user/ntuser/keyboard.c
117 user/ntuser/kbdlayout.c
118 user/ntuser/menu.c
119 user/ntuser/message.c
120 user/ntuser/metric.c
121 user/ntuser/misc.c
122 user/ntuser/monitor.c
123 user/ntuser/mouse.c
124 user/ntuser/msgqueue.c
125 user/ntuser/ntstubs.c
126 user/ntuser/ntuser.c
127 user/ntuser/painting.c
128 user/ntuser/prop.c
129 user/ntuser/scrollbar.c
130 user/ntuser/session.c
131 user/ntuser/simplecall.c
132 user/ntuser/sysparams.c
133 user/ntuser/timer.c
134 user/ntuser/useratom.c
135 user/ntuser/vis.c
136 user/ntuser/windc.c
137 user/ntuser/window.c
138 user/ntuser/winpos.c
139 user/ntuser/winsta.c
140 user/ntuser/object.c
141 gdi/ntgdi/arc.c
142 gdi/ntgdi/bezier.c
143 gdi/ntgdi/bitblt.c
144 gdi/ntgdi/bitmaps.c
145 gdi/ntgdi/brush.c
146 gdi/ntgdi/cliprgn.c
147 gdi/ntgdi/coord.c
148 gdi/ntgdi/dcattr.c
149 gdi/ntgdi/dclife.c
150 gdi/ntgdi/dcobjs.c
151 gdi/ntgdi/dcstate.c
152 gdi/ntgdi/dcutil.c
153 gdi/ntgdi/device.c
154 gdi/ntgdi/dibobj.c
155 gdi/ntgdi/drawing.c
156 gdi/ntgdi/fillshap.c
157 gdi/ntgdi/font.c
158 gdi/ntgdi/freetype.c
159 gdi/ntgdi/gdibatch.c
160 gdi/ntgdi/gdidbg.c
161 gdi/ntgdi/gdiobj.c
162 gdi/ntgdi/gdipool.c
163 gdi/ntgdi/icm.c
164 gdi/ntgdi/line.c
165 gdi/ntgdi/metafile.c
166 gdi/ntgdi/palette.c
167 gdi/ntgdi/path.c
168 gdi/ntgdi/pen.c
169 gdi/ntgdi/polyfill.c
170 gdi/ntgdi/print.c
171 gdi/ntgdi/rect.c
172 gdi/ntgdi/region.c
173 gdi/ntgdi/stockobj.c
174 gdi/ntgdi/text.c
175 gdi/ntgdi/wingl.c
176 gdi/ntgdi/xformobj.c
177 gdi/eng/stubs.c
178 gdi/eng/umpdstubs.c
179 win32k.rc)
180
181 if(USE_DIBLIB)
182 add_definitions(-D_USE_DIBLIB_)
183 list(APPEND SOURCE
184 gdi/dib/dib_new.c
185 gdi/eng/bitblt_new.c)
186 else()
187 list(APPEND SOURCE
188 gdi/dib/dib.c
189 gdi/eng/copybits.c
190 ${GENDIB_FILES})
191 endif()
192
193 if(ARCH STREQUAL "i386")
194 list(APPEND SOURCE
195 gdi/dib/i386/dib24bpp_hline.s
196 gdi/dib/i386/dib32bpp_hline.s
197 gdi/dib/i386/dib32bpp_colorfill.s
198 gdi/eng/i386/floatobj.S)
199 else()
200 list(APPEND SOURCE
201 gdi/dib/dib24bppc.c
202 gdi/dib/dib32bppc.c)
203 endif()
204
205 if(KDBG)
206 list(APPEND SOURCE
207 gdi/ntgdi/gdikdbgext.c)
208 endif()
209
210 add_library(win32k SHARED
211 ${CMAKE_CURRENT_BINARY_DIR}/win32k.def
212 ${SOURCE})
213
214 set_module_type(win32k kernelmodedriver)
215
216 target_link_libraries(win32k
217 ${PSEH_LIB}
218 dxguid
219 libcntpr)
220
221 if(USE_DIBLIB)
222 target_link_libraries(win32k diblib)
223 endif()
224
225 add_importlibs(win32k ntoskrnl hal ftfd)
226 add_pch(win32k pch.h)
227 add_cd_file(TARGET win32k DESTINATION reactos/system32 FOR all)
228
229 add_library(win32ksys sys-stubs.S)
230 set_source_files_properties(sys-stubs.S PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/w32ksvc.h)