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) 13 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(ARCH STREQUAL "i386") 97 list(APPEND ASM_SOURCE 98 client/i386/fiber.S 99 client/i386/thread.S) 100elseif(ARCH STREQUAL "amd64") 101 list(APPEND ASM_SOURCE 102 client/amd64/fiber.S 103 client/amd64/thread.S) 104elseif(ARCH STREQUAL "arm") 105 list(APPEND ASM_SOURCE 106 client/arm/fiber.S 107 client/arm/thread.S) 108endif() 109 110add_asm_files(kernel32_asm ${ASM_SOURCE}) 111add_library(kernel32 MODULE 112 ${SOURCE} 113 ${kernel32_asm} 114 kernel32.rc 115 ${CMAKE_CURRENT_BINARY_DIR}/kernel32_stubs.c 116 ${CMAKE_CURRENT_BINARY_DIR}/kernel32.def) 117 118set_module_type(kernel32 win32dll ENTRYPOINT DllMain 12) 119############################################# 120## HACK FOR MSVC COMPILATION WITH win32dll ## 121set_subsystem(kernel32 console) 122################# END HACK ################# 123 124target_link_libraries(kernel32 kernel32_shared wine chkstk ${PSEH_LIB}) 125add_importlibs(kernel32 ntdll) 126add_pch(kernel32 k32.h SOURCE) 127add_dependencies(kernel32 psdk errcodes asm) 128add_cd_file(TARGET kernel32 DESTINATION reactos/system32 FOR all) 129