2011-05-16 13:12:07 +00:00
|
|
|
|
2020-09-13 07:16:17 +00:00
|
|
|
add_subdirectory(kernel32_vista)
|
|
|
|
|
2011-05-16 13:12:07 +00:00
|
|
|
add_definitions(-D_KERNEL32_)
|
2016-04-20 12:36:25 +00:00
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/subsys)
|
2012-03-07 21:21:27 +00:00
|
|
|
spec2def(kernel32.dll kernel32.spec ADD_IMPORTLIB)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2020-09-13 08:03:58 +00:00
|
|
|
# Shared between kernel32 and kernel32_vista
|
|
|
|
add_library(kernel32_shared
|
|
|
|
client/shared_utils.c
|
|
|
|
client/file/fileutils.c
|
|
|
|
)
|
2021-04-22 15:28:52 +00:00
|
|
|
target_link_libraries(kernel32_shared PRIVATE pseh)
|
2020-09-13 08:03:58 +00:00
|
|
|
add_dependencies(kernel32_shared psdk)
|
|
|
|
|
2011-05-16 13:12:07 +00:00
|
|
|
list(APPEND SOURCE
|
2013-08-29 04:34:00 +00:00
|
|
|
client/actctx.c
|
2012-10-17 23:10:40 +00:00
|
|
|
client/appcache.c
|
|
|
|
client/atom.c
|
|
|
|
client/compname.c
|
2011-07-20 16:14:21 +00:00
|
|
|
client/debugger.c
|
2011-11-07 00:18:13 +00:00
|
|
|
client/dosdev.c
|
2012-10-17 23:10:40 +00:00
|
|
|
client/dllmain.c
|
|
|
|
client/environ.c
|
2011-07-20 16:14:21 +00:00
|
|
|
client/except.c
|
2011-07-20 19:04:59 +00:00
|
|
|
client/fiber.c
|
2012-10-17 23:10:40 +00:00
|
|
|
client/handle.c
|
2011-07-20 19:04:59 +00:00
|
|
|
client/heapmem.c
|
|
|
|
client/job.c
|
2012-10-17 23:10:40 +00:00
|
|
|
client/loader.c
|
|
|
|
client/path.c
|
|
|
|
client/perfcnt.c
|
|
|
|
client/power.c
|
2011-07-20 19:04:59 +00:00
|
|
|
client/proc.c
|
2012-10-17 23:10:40 +00:00
|
|
|
client/resntfy.c
|
2011-07-20 19:04:59 +00:00
|
|
|
client/session.c
|
|
|
|
client/synch.c
|
2012-10-17 23:10:40 +00:00
|
|
|
client/sysinfo.c
|
|
|
|
client/time.c
|
|
|
|
client/timerqueue.c
|
|
|
|
client/toolhelp.c
|
|
|
|
client/utils.c
|
2011-07-20 19:04:59 +00:00
|
|
|
client/thread.c
|
2012-10-17 23:10:40 +00:00
|
|
|
client/vdm.c
|
|
|
|
client/version.c
|
2011-07-20 19:04:59 +00:00
|
|
|
client/virtmem.c
|
2012-11-15 17:13:53 +00:00
|
|
|
client/console/alias.c
|
2012-11-15 16:24:43 +00:00
|
|
|
client/console/console.c
|
2012-11-15 17:13:53 +00:00
|
|
|
client/console/history.c
|
2013-02-10 13:59:09 +00:00
|
|
|
client/console/init.c
|
2012-11-15 18:06:17 +00:00
|
|
|
client/console/readwrite.c
|
2012-11-15 22:34:44 +00:00
|
|
|
client/console/vista.c
|
2011-07-20 18:14:08 +00:00
|
|
|
client/file/backup.c
|
2011-07-20 16:14:21 +00:00
|
|
|
client/file/cnotify.c
|
|
|
|
client/file/copy.c
|
|
|
|
client/file/create.c
|
|
|
|
client/file/delete.c
|
|
|
|
client/file/deviceio.c
|
|
|
|
client/file/dir.c
|
2013-08-04 17:32:38 +00:00
|
|
|
client/file/disk.c
|
2011-11-07 00:18:13 +00:00
|
|
|
client/file/fileinfo.c
|
2011-07-20 19:04:59 +00:00
|
|
|
client/file/filemap.c
|
2011-11-07 00:18:13 +00:00
|
|
|
client/file/filename.c
|
2011-07-20 16:14:21 +00:00
|
|
|
client/file/find.c
|
|
|
|
client/file/hardlink.c
|
|
|
|
client/file/iocompl.c
|
|
|
|
client/file/lfile.c
|
|
|
|
client/file/lock.c
|
|
|
|
client/file/mailslot.c
|
|
|
|
client/file/move.c
|
2013-08-04 17:32:38 +00:00
|
|
|
client/file/mntpoint.c
|
2011-07-20 16:14:21 +00:00
|
|
|
client/file/npipe.c
|
|
|
|
client/file/rw.c
|
|
|
|
client/file/tape.c
|
|
|
|
client/file/volume.c
|
2011-07-22 03:26:28 +00:00
|
|
|
wine/actctx.c
|
|
|
|
wine/comm.c
|
|
|
|
wine/lzexpand.c
|
|
|
|
wine/muldiv.c
|
|
|
|
wine/profile.c
|
|
|
|
wine/res.c
|
|
|
|
wine/timezone.c
|
2011-07-20 16:14:21 +00:00
|
|
|
winnls/string/casemap.c
|
|
|
|
winnls/string/collation.c
|
2018-04-11 11:44:23 +00:00
|
|
|
winnls/string/digitmap.c
|
2011-07-20 16:14:21 +00:00
|
|
|
winnls/string/fold.c
|
|
|
|
winnls/string/format_msg.c
|
2019-04-07 11:20:23 +00:00
|
|
|
winnls/string/japanese.c
|
2011-07-20 16:14:21 +00:00
|
|
|
winnls/string/lang.c
|
|
|
|
winnls/string/lcformat.c
|
|
|
|
winnls/string/lstring.c
|
|
|
|
winnls/string/nls.c
|
|
|
|
winnls/string/sortkey.c
|
2014-02-10 12:19:56 +00:00
|
|
|
k32.h)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2021-06-29 08:03:28 +00:00
|
|
|
if(MSVC)
|
|
|
|
# Disable warning C4146: unary minus operator applied to unsigned type, result still unsigned
|
|
|
|
set_source_files_properties(wine/res.c PROPERTIES COMPILE_FLAGS /wd4146)
|
|
|
|
endif()
|
|
|
|
|
2012-08-27 18:58:27 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND ASM_SOURCE
|
2012-12-22 10:47:06 +00:00
|
|
|
client/i386/fiber.S
|
|
|
|
client/i386/thread.S)
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "amd64")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND ASM_SOURCE
|
2018-02-12 18:14:15 +00:00
|
|
|
client/amd64/fiber.S)
|
2015-05-14 22:32:35 +00:00
|
|
|
elseif(ARCH STREQUAL "arm")
|
|
|
|
list(APPEND ASM_SOURCE
|
|
|
|
client/arm/fiber.S
|
|
|
|
client/arm/thread.S)
|
2012-12-22 10:47:06 +00:00
|
|
|
endif()
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2013-01-08 20:33:08 +00:00
|
|
|
add_asm_files(kernel32_asm ${ASM_SOURCE})
|
2019-03-20 13:19:48 +00:00
|
|
|
add_library(kernel32 MODULE
|
2014-02-10 12:19:56 +00:00
|
|
|
${SOURCE}
|
|
|
|
${kernel32_asm}
|
|
|
|
kernel32.rc
|
2018-08-25 15:26:18 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/kernel32_stubs.c
|
2014-02-10 12:19:56 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/kernel32.def)
|
2013-09-01 00:11:56 +00:00
|
|
|
|
2015-11-04 18:06:16 +00:00
|
|
|
set_module_type(kernel32 win32dll ENTRYPOINT DllMain 12)
|
2013-09-01 00:11:56 +00:00
|
|
|
#############################################
|
|
|
|
## HACK FOR MSVC COMPILATION WITH win32dll ##
|
|
|
|
set_subsystem(kernel32 console)
|
|
|
|
################# END HACK #################
|
|
|
|
|
2020-09-13 08:03:58 +00:00
|
|
|
target_link_libraries(kernel32 kernel32_shared wine chkstk ${PSEH_LIB})
|
2011-05-16 13:12:07 +00:00
|
|
|
add_importlibs(kernel32 ntdll)
|
2014-02-10 12:19:56 +00:00
|
|
|
add_pch(kernel32 k32.h SOURCE)
|
2011-05-16 13:12:07 +00:00
|
|
|
add_dependencies(kernel32 psdk errcodes asm)
|
|
|
|
add_cd_file(TARGET kernel32 DESTINATION reactos/system32 FOR all)
|