2014-10-18 14:22:09 +00:00
|
|
|
|
2014-02-10 17:12:41 +00:00
|
|
|
include(../ntos.cmake)
|
|
|
|
|
2014-11-10 16:26:55 +00:00
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl)
|
2014-02-10 17:12:41 +00:00
|
|
|
spec2def(ntkrnlmp.exe ../ntoskrnl.spec)
|
|
|
|
|
|
|
|
if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
|
|
|
|
set_source_files_properties(${NTKRNLMP_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "CONFIG_SMP")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_asm_files(ntkrnlmp_asm ${NTKRNLMP_ASM_SOURCE})
|
|
|
|
|
|
|
|
add_executable(ntkrnlmp
|
|
|
|
${ntkrnlmp_asm}
|
|
|
|
${NTKRNLMP_SOURCE}
|
|
|
|
${REACTOS_SOURCE_DIR}/ntoskrnl/guid.c
|
|
|
|
${REACTOS_SOURCE_DIR}/ntoskrnl/ntoskrnl.rc
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
|
2019-02-03 11:57:20 +00:00
|
|
|
set_property(TARGET ntkrnlmp PROPERTY ENABLE_EXPORTS TRUE)
|
2014-02-10 17:12:41 +00:00
|
|
|
|
|
|
|
add_target_compile_definitions(ntkrnlmp CONFIG_SMP)
|
|
|
|
|
|
|
|
if(ARCH STREQUAL "i386")
|
|
|
|
set_entrypoint(ntkrnlmp KiSystemStartup 4)
|
|
|
|
else()
|
|
|
|
set_entrypoint(ntkrnlmp KiSystemStartup)
|
|
|
|
endif()
|
|
|
|
set_subsystem(ntkrnlmp native)
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set_image_base(ntkrnlmp 0x00400000)
|
2015-09-04 06:37:05 +00:00
|
|
|
add_target_link_flags(ntkrnlmp "/SECTION:.rsrc,!DP") #Accessed from bugcheck code
|
2014-02-10 17:12:41 +00:00
|
|
|
else()
|
|
|
|
set_image_base(ntkrnlmp 0x80800000)
|
|
|
|
endif()
|
|
|
|
|
2014-10-04 20:26:14 +00:00
|
|
|
if(STACK_PROTECTOR)
|
|
|
|
target_link_libraries(ntkrnlmp gcc_ssp)
|
2014-10-18 14:22:09 +00:00
|
|
|
elseif(RUNTIME_CHECKS)
|
|
|
|
target_link_libraries(ntkrnlmp runtmchk)
|
2014-10-04 20:26:14 +00:00
|
|
|
endif()
|
|
|
|
|
2016-09-20 23:43:16 +00:00
|
|
|
target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
|
2014-02-10 17:12:41 +00:00
|
|
|
add_importlibs(ntkrnlmp hal kdcom bootvid)
|
|
|
|
add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
|
|
|
|
add_dependencies(ntkrnlmp psdk bugcodes asm)
|
|
|
|
add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)
|