2 add_definitions(-D_KERNEL32_)
3 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
4 spec2def(kernel32.dll kernel32.spec ADD_IMPORTLIB)
38 client/console/alias.c
39 client/console/console.c
40 client/console/history.c
42 client/console/readwrite.c
43 client/console/vista.c
49 client/file/deviceio.c
52 client/file/fileinfo.c
54 client/file/filename.c
56 client/file/hardlink.c
60 client/file/mailslot.c
62 client/file/mntpoint.c
74 winnls/string/casemap.c
75 winnls/string/collation.c
77 winnls/string/format_msg.c
79 winnls/string/lcformat.c
80 winnls/string/lstring.c
82 winnls/string/sortkey.c
85 if(ARCH STREQUAL "i386")
86 list(APPEND ASM_SOURCE
89 elseif(ARCH STREQUAL "amd64")
90 list(APPEND ASM_SOURCE
92 client/amd64/thread.S)
95 add_asm_files(kernel32_asm ${ASM_SOURCE})
96 add_library(kernel32 SHARED
100 ${CMAKE_CURRENT_BINARY_DIR}/kernel32.def)
102 set_module_type(kernel32 win32dll HOTPATCHABLE ENTRYPOINT DllMain 12)
103 #############################################
104 ## HACK FOR MSVC COMPILATION WITH win32dll ##
105 set_subsystem(kernel32 console)
106 ################# END HACK #################
108 target_link_libraries(kernel32 wine chkstk ${PSEH_LIB})
109 add_importlibs(kernel32 ntdll)
110 add_pch(kernel32 k32.h SOURCE)
111 add_dependencies(kernel32 psdk errcodes asm)
112 add_cd_file(TARGET kernel32 DESTINATION reactos/system32 FOR all)