1 2add_subdirectory(kernel32_vista) 3 4add_definitions(-D_KERNEL32_) 5include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/subsys) 6spec2def(kernel32.dll kernel32.spec ADD_IMPORTLIB) 7 8# Shared between kernel32 and kernel32_vista 9add_library(kernel32_shared 10 client/shared_utils.c 11 client/file/fileutils.c 12) 13target_link_libraries(kernel32_shared PRIVATE pseh) 14add_dependencies(kernel32_shared psdk) 15 16list(APPEND SOURCE 17 client/actctx.c 18 client/appcache.c 19 client/atom.c 20 client/compname.c 21 client/debugger.c 22 client/dosdev.c 23 client/dllmain.c 24 client/environ.c 25 client/except.c 26 client/fiber.c 27 client/handle.c 28 client/heapmem.c 29 client/job.c 30 client/loader.c 31 client/path.c 32 client/perfcnt.c 33 client/power.c 34 client/proc.c 35 client/resntfy.c 36 client/session.c 37 client/synch.c 38 client/sysinfo.c 39 client/time.c 40 client/timerqueue.c 41 client/toolhelp.c 42 client/utils.c 43 client/thread.c 44 client/vdm.c 45 client/version.c 46 client/virtmem.c 47 client/console/alias.c 48 client/console/console.c 49 client/console/history.c 50 client/console/init.c 51 client/console/readwrite.c 52 client/console/vista.c 53 client/file/backup.c 54 client/file/cnotify.c 55 client/file/copy.c 56 client/file/create.c 57 client/file/delete.c 58 client/file/deviceio.c 59 client/file/dir.c 60 client/file/disk.c 61 client/file/fileinfo.c 62 client/file/filemap.c 63 client/file/filename.c 64 client/file/find.c 65 client/file/hardlink.c 66 client/file/iocompl.c 67 client/file/lfile.c 68 client/file/lock.c 69 client/file/mailslot.c 70 client/file/move.c 71 client/file/mntpoint.c 72 client/file/npipe.c 73 client/file/rw.c 74 client/file/tape.c 75 client/file/volume.c 76 wine/actctx.c 77 wine/comm.c 78 wine/lzexpand.c 79 wine/muldiv.c 80 wine/profile.c 81 wine/res.c 82 wine/timezone.c 83 winnls/string/casemap.c 84 winnls/string/collation.c 85 winnls/string/digitmap.c 86 winnls/string/fold.c 87 winnls/string/format_msg.c 88 winnls/string/japanese.c 89 winnls/string/lang.c 90 winnls/string/lcformat.c 91 winnls/string/lstring.c 92 winnls/string/nls.c 93 winnls/string/sortkey.c 94 k32.h) 95 96if(MSVC) 97 # Disable warning C4146: unary minus operator applied to unsigned type, result still unsigned 98 set_source_files_properties(wine/res.c PROPERTIES COMPILE_FLAGS /wd4146) 99endif() 100 101if(ARCH STREQUAL "i386") 102 list(APPEND ASM_SOURCE 103 client/i386/fiber.S 104 client/i386/thread.S) 105elseif(ARCH STREQUAL "amd64") 106 list(APPEND ASM_SOURCE 107 client/amd64/fiber.S) 108elseif(ARCH STREQUAL "arm") 109 list(APPEND ASM_SOURCE 110 client/arm/fiber.S 111 client/arm/thread.S) 112endif() 113 114add_asm_files(kernel32_asm ${ASM_SOURCE}) 115add_library(kernel32 MODULE 116 ${SOURCE} 117 ${kernel32_asm} 118 kernel32.rc 119 ${CMAKE_CURRENT_BINARY_DIR}/kernel32_stubs.c 120 ${CMAKE_CURRENT_BINARY_DIR}/kernel32.def) 121 122set_module_type(kernel32 win32dll ENTRYPOINT DllMain 12) 123############################################# 124## HACK FOR MSVC COMPILATION WITH win32dll ## 125set_subsystem(kernel32 console) 126################# END HACK ################# 127 128target_link_libraries(kernel32 kernel32_shared wine chkstk ${PSEH_LIB}) 129add_importlibs(kernel32 ntdll) 130add_pch(kernel32 k32.h SOURCE) 131add_dependencies(kernel32 psdk errcodes asm) 132add_cd_file(TARGET kernel32 DESTINATION reactos/system32 FOR all) 133