[MSHTML] Fake Success in HTMLDocument_put_bgColor()
[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 set_property(TARGET ntoskrnl PROPERTY ENABLE_EXPORTS TRUE)
22 set_target_properties(ntoskrnl PROPERTIES DEFINE_SYMBOL "")
23
24 if(ARCH STREQUAL "i386")
25 set_entrypoint(ntoskrnl KiSystemStartup 4)
26 else()
27 set_entrypoint(ntoskrnl KiSystemStartup)
28 endif()
29 set_subsystem(ntoskrnl native)
30
31 if(MSVC)
32 set_image_base(ntoskrnl 0x00400000)
33 add_target_link_flags(ntoskrnl "/SECTION:.rsrc,!DP") #Accessed from bugcheck code
34 else()
35 if(GDB)
36 set_image_base(ntoskrnl 0x00800000)
37 else()
38 set_image_base(ntoskrnl 0x80800000)
39 endif()
40 endif()
41
42 target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
43
44 if(STACK_PROTECTOR)
45 target_link_libraries(ntoskrnl gcc_ssp)
46 elseif(RUNTIME_CHECKS)
47 target_link_libraries(ntoskrnl runtmchk)
48 endif()
49
50 add_importlibs(ntoskrnl hal kdcom bootvid)
51 add_pch(ntoskrnl ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTOSKRNL_SOURCE)
52 add_dependencies(ntoskrnl psdk bugcodes asm)
53 add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
54
55 if(BUILD_MP)
56 add_subdirectory(ntkrnlmp)
57 endif()
58
59 add_asm_files(ntdllsys_asm ntdll.S)
60 add_library(ntdllsys ${ntdllsys_asm})
61 set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE "C")
62 add_dependencies(ntdllsys asm)