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