[CMAKE]
[reactos.git] / dll / win32 / kernel32 / CMakeLists.txt
1
2 add_definitions(-D_KERNEL32_)
3
4 remove_definitions(-D_WIN32_WINNT=0x502)
5 add_definitions(-D_WIN32_WINNT=0x600)
6
7 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
8
9 set_rc_compiler()
10
11 set_rc_compiler()
12
13 spec2def(kernel32.dll kernel32.spec)
14
15 list(APPEND SOURCE
16 debug/debugger.c
17 debug/output.c
18 except/except.c
19 file/backup.c
20 file/bintype.c
21 file/cnotify.c
22 file/copy.c
23 file/create.c
24 file/curdir.c
25 file/delete.c
26 file/deviceio.c
27 file/dir.c
28 file/dosdev.c
29 file/file.c
30 file/find.c
31 file/hardlink.c
32 file/iocompl.c
33 file/lfile.c
34 file/lock.c
35 file/mailslot.c
36 file/move.c
37 file/npipe.c
38 file/pipe.c
39 file/rw.c
40 file/tape.c
41 file/volume.c
42 mem/global.c
43 mem/heap.c
44 mem/isbad.c
45 mem/local.c
46 mem/procmem.c
47 mem/resnotify.c
48 mem/section.c
49 mem/virtual.c
50 misc/actctx.c
51 misc/atom.c
52 misc/casemap.c
53 misc/chartype.c
54 misc/collation.c
55 misc/comm.c
56 misc/commdcb.c
57 misc/computername.c
58 misc/console.c
59 misc/dllmain.c
60 misc/env.c
61 misc/error.c
62 misc/fold.c
63 misc/format_msg.c
64 misc/handle.c
65 misc/lang.c
66 misc/lcformat.c
67 misc/ldr.c
68 misc/lzexpand.c
69 misc/muldiv.c
70 misc/nls.c
71 misc/perfcnt.c
72 misc/power.c
73 misc/profile.c
74 misc/recovery.c
75 misc/res.c
76 misc/sortkey.c
77 misc/stubs.c
78 misc/sysinfo.c
79 misc/time.c
80 misc/timerqueue.c
81 misc/toolhelp.c
82 misc/utils.c
83 misc/version.c
84 process/cmdline.c
85 process/procsup.c
86 process/job.c
87 process/proc.c
88 process/session.c
89 string/lstring.c
90 synch/condvar.c
91 synch/critical.c
92 synch/event.c
93 synch/mutex.c
94 synch/sem.c
95 synch/timer.c
96 synch/wait.c
97 thread/fiber.c
98 thread/fls.c
99 thread/thread.c
100 thread/tls.c
101 kernel32.rc
102 ${CMAKE_CURRENT_BINARY_DIR}/kernel32.def)
103
104 if(ARCH MATCHES i386)
105 list(APPEND SOURCE
106 thread/i386/fiber.S
107 thread/i386/thread.S)
108 elseif(ARCH MATCHES amd64)
109 list(APPEND SOURCE
110 thread/amd64/fiber.S
111 thread/amd64/thread.S)
112 endif(ARCH MATCHES i386)
113
114 add_library(kernel32 SHARED
115 ${CMAKE_CURRENT_BINARY_DIR}/kernel32_k32.h.gch
116 ${SOURCE})
117
118 set_entrypoint(kernel32 DllMain@12)
119 set_image_base(kernel32 ${baseaddress_kernel32})
120
121 target_link_libraries(kernel32 ${PSEH_LIB})
122
123 add_importlibs(kernel32 ntdll)
124 add_pch(kernel32 ${CMAKE_CURRENT_SOURCE_DIR}/k32.h ${SOURCE})
125 add_dependencies(kernel32 psdk errcodes asm)
126 add_cab_target(kernel32 1)
127 add_importlib_target(kernel32.spec)