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