[CLASS2]: Fix status code on too small as exposed by kernel32:DeviceIoControl
[reactos.git] / ntoskrnl / ntkrnlmp / CMakeLists.txt
index f162c6f..385e862 100644 (file)
@@ -1,5 +1,7 @@
+
 include(../ntos.cmake)
 
+include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl)
 spec2def(ntkrnlmp.exe ../ntoskrnl.spec)
 
 if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
@@ -26,26 +28,18 @@ set_subsystem(ntkrnlmp native)
 
 if(MSVC)
     set_image_base(ntkrnlmp 0x00400000)
+    add_target_link_flags(ntkrnlmp "/SECTION:.rsrc,!DP") #Accessed from bugcheck code
 else()
     set_image_base(ntkrnlmp 0x80800000)
 endif()
 
-# Linker bug
-if(NOT MSVC AND LTCG)
-    add_target_link_flags(ntkrnlmp "-shared")
+if(STACK_PROTECTOR)
+    target_link_libraries(ntkrnlmp gcc_ssp)
+elseif(RUNTIME_CHECKS)
+    target_link_libraries(ntkrnlmp runtmchk)
 endif()
 
-target_link_libraries(ntkrnlmp
-    cportlib
-    csq
-    ${PSEH_LIB}
-    cmlib
-    rtl
-    ${ROSSYM_LIB}
-    libcntpr
-    wdmguid
-    ioevent)
-
+target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
 add_importlibs(ntkrnlmp hal kdcom bootvid)
 add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
 add_dependencies(ntkrnlmp psdk bugcodes asm)