[MS] Add messages 2200-2249 and 3502-3507 to netmsg.dll.
[reactos.git] / ntoskrnl / CMakeLists.txt
1
2 PROJECT(NTOS)
3
4 include(ntos.cmake)
5
6 set(NTOSKRNL_SOURCE ${SOURCE})
7 set(NTOSKRNL_ASM_SOURCE ${ASM_SOURCE})
8
9 set(NTKRNLMP_SOURCE ${SOURCE})
10 set(NTKRNLMP_ASM_SOURCE ${ASM_SOURCE})
11
12 spec2def(ntoskrnl.exe ntoskrnl.spec ADD_IMPORTLIB)
13 add_asm_files(ntoskrnl_asm ${NTOSKRNL_ASM_SOURCE})
14
15 add_executable(ntoskrnl
16 ${ntoskrnl_asm}
17 ${NTOSKRNL_SOURCE}
18 guid.c
19 ntoskrnl.rc
20 ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
21
22 if(ARCH STREQUAL "i386")
23 set_entrypoint(ntoskrnl KiSystemStartup 4)
24 else()
25 set_entrypoint(ntoskrnl KiSystemStartup)
26 endif()
27 set_subsystem(ntoskrnl native)
28
29 if(MSVC)
30 set_image_base(ntoskrnl 0x00400000)
31 add_target_link_flags(ntoskrnl "/SECTION:.rsrc,!DP") #Accessed from bugcheck code
32 else()
33 if(GDB)
34 set_image_base(ntoskrnl 0x00800000)
35 else()
36 set_image_base(ntoskrnl 0x80800000)
37 endif()
38 endif()
39
40 target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
41
42 if(STACK_PROTECTOR)
43 target_link_libraries(ntoskrnl gcc_ssp)
44 elseif(RUNTIME_CHECKS)
45 target_link_libraries(ntoskrnl runtmchk)
46 endif()
47
48 add_importlibs(ntoskrnl hal kdcom bootvid)
49 add_pch(ntoskrnl ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTOSKRNL_SOURCE)
50 add_dependencies(ntoskrnl psdk bugcodes asm)
51 add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
52
53 if(BUILD_MP)
54 add_subdirectory(ntkrnlmp)
55 endif()
56
57 add_asm_files(ntdllsys_asm ntdll.S)
58 add_library(ntdllsys ${ntdllsys_asm})
59 set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE "C")
60 add_dependencies(ntdllsys asm)