* Sync up to trunk head (r64716).
[reactos.git] / ntoskrnl / ntkrnlmp / CMakeLists.txt
1 include(../ntos.cmake)
2
3 spec2def(ntkrnlmp.exe ../ntoskrnl.spec)
4
5 if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
6 set_source_files_properties(${NTKRNLMP_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "CONFIG_SMP")
7 endif()
8
9 add_asm_files(ntkrnlmp_asm ${NTKRNLMP_ASM_SOURCE})
10
11 add_executable(ntkrnlmp
12 ${ntkrnlmp_asm}
13 ${NTKRNLMP_SOURCE}
14 ${REACTOS_SOURCE_DIR}/ntoskrnl/guid.c
15 ${REACTOS_SOURCE_DIR}/ntoskrnl/ntoskrnl.rc
16 ${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
17
18 add_target_compile_definitions(ntkrnlmp CONFIG_SMP)
19
20 if(ARCH STREQUAL "i386")
21 set_entrypoint(ntkrnlmp KiSystemStartup 4)
22 else()
23 set_entrypoint(ntkrnlmp KiSystemStartup)
24 endif()
25 set_subsystem(ntkrnlmp native)
26
27 if(MSVC)
28 set_image_base(ntkrnlmp 0x00400000)
29 else()
30 set_image_base(ntkrnlmp 0x80800000)
31 endif()
32
33 if(STACK_PROTECTOR)
34 target_link_libraries(ntkrnlmp gcc_ssp)
35 endif()
36
37 target_link_libraries(ntkrnlmp
38 cportlib
39 csq
40 ${PSEH_LIB}
41 cmlib
42 rtl
43 ${ROSSYM_LIB}
44 libcntpr
45 wdmguid
46 ioevent)
47
48 add_importlibs(ntkrnlmp hal kdcom bootvid)
49 add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
50 add_dependencies(ntkrnlmp psdk bugcodes asm)
51 add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)