2 spec2def(ntdll.dll def/ntdll.spec ADD_IMPORTLIB)
11 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/subsys)
29 if(ARCH STREQUAL "i386")
30 list(APPEND ASM_SOURCE dispatch/i386/dispatch.S)
31 elseif(ARCH STREQUAL "amd64")
32 list(APPEND ASM_SOURCE dispatch/amd64/dispatch.S)
33 elseif(ARCH STREQUAL "arm")
34 list(APPEND ASM_SOURCE dispatch/arm/stubs_asm.s)
36 list(APPEND SOURCE dispatch/dispatch.c)
39 add_asm_files(ntdll_asm ${ASM_SOURCE})
41 add_library(ntdll MODULE
45 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c
46 ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
48 set_module_type(ntdll win32dll ENTRYPOINT 0)
49 #############################################
50 ## HACK FOR MSVC COMPILATION WITH win32dll ##
51 set_subsystem(ntdll console)
52 ################# END HACK #################
55 add_target_link_flags(ntdll "/RELEASE")
58 target_link_libraries(ntdll rtl ntdllsys libcntpr uuid ${PSEH_LIB})
59 add_pch(ntdll include/ntdll.h SOURCE)
60 add_dependencies(ntdll ntstatus asm)
61 add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)