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