[SYSDM] Add one more IDC_MACHINELINE for model name
[reactos.git] / ntoskrnl / ntkrnlmp / CMakeLists.txt
1
2 include(../ntos.cmake)
3
4 include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl)
5 spec2def(ntkrnlmp.exe ../ntoskrnl.spec)
6
7 if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
8 set_source_files_properties(${NTKRNLMP_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "CONFIG_SMP")
9 endif()
10
11 add_asm_files(ntkrnlmp_asm ${NTKRNLMP_ASM_SOURCE})
12
13 add_executable(ntkrnlmp
14 ${ntkrnlmp_asm}
15 ${NTKRNLMP_SOURCE}
16 ${REACTOS_SOURCE_DIR}/ntoskrnl/guid.c
17 ${REACTOS_SOURCE_DIR}/ntoskrnl/ntoskrnl.rc
18 ${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
19
20 add_target_compile_definitions(ntkrnlmp CONFIG_SMP)
21
22 if(ARCH STREQUAL "i386")
23 set_entrypoint(ntkrnlmp KiSystemStartup 4)
24 else()
25 set_entrypoint(ntkrnlmp KiSystemStartup)
26 endif()
27 set_subsystem(ntkrnlmp native)
28
29 if(MSVC)
30 set_image_base(ntkrnlmp 0x00400000)
31 add_target_link_flags(ntkrnlmp "/SECTION:.rsrc,!DP") #Accessed from bugcheck code
32 else()
33 set_image_base(ntkrnlmp 0x80800000)
34 endif()
35
36 if(STACK_PROTECTOR)
37 target_link_libraries(ntkrnlmp gcc_ssp)
38 elseif(RUNTIME_CHECKS)
39 target_link_libraries(ntkrnlmp runtmchk)
40 endif()
41
42 target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
43 add_importlibs(ntkrnlmp hal kdcom bootvid)
44 add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
45 add_dependencies(ntkrnlmp psdk bugcodes asm)
46 add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)