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