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