Sync with trunk r63935.
[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 target_link_libraries(ntkrnlmp
34 cportlib
35 csq
36 ${PSEH_LIB}
37 cmlib
38 rtl
39 ${ROSSYM_LIB}
40 libcntpr
41 wdmguid
42 ioevent)
43
44 add_importlibs(ntkrnlmp hal kdcom bootvid)
45 add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
46 add_dependencies(ntkrnlmp psdk bugcodes asm)
47 add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)