[BASESRV-CONSRV-WINSRV]
[reactos.git] / dll / ntdll / CMakeLists.txt
1
2 spec2def(ntdll.dll def/ntdll.spec ADD_IMPORTLIB)
3
4 add_definitions(
5 -D__NTDLL__
6 -D_NTOSKRNL_
7 -DCRTDLL)
8
9 include_directories(
10 BEFORE include
11 ${REACTOS_SOURCE_DIR}/include/reactos/subsys
12 ${REACTOS_SOURCE_DIR}/win32ss/include)
13
14 list(APPEND SOURCE
15 csr/api.c
16 csr/capture.c
17 csr/connect.c
18 dbg/dbgui.c
19 ldr/ldrapi.c
20 ldr/ldrinit.c
21 ldr/ldrpe.c
22 ldr/ldrutils.c
23 rtl/libsupp.c
24 rtl/version.c
25 def/ntdll.rc
26 ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
27
28 if(ARCH STREQUAL "i386")
29 list(APPEND ASM_SOURCE dispatch/i386/dispatch.S)
30 elseif(ARCH STREQUAL "amd64")
31 list(APPEND ASM_SOURCE dispatch/amd64/dispatch.S)
32 elseif(ARCH STREQUAL "arm")
33 list(APPEND ASM_SOURCE dispatch/arm/stubs_asm.s)
34 else()
35 list(APPEND SOURCE dispatch/dispatch.c)
36 endif()
37
38 add_asm_files(ntdll_asm ${ASM_SOURCE})
39 add_library(ntdll SHARED ${SOURCE} ${ntdll_asm})
40
41 set_module_type(ntdll win32dll ENTRYPOINT 0)
42
43 if(MSVC)
44 add_target_link_flags(ntdll "/RELEASE")
45 endif()
46
47 target_link_libraries(ntdll
48 rtl
49 ntdllsys
50 libcntpr
51 ${PSEH_LIB})
52
53 add_pch(ntdll include/ntdll.h)
54 add_dependencies(ntdll ntstatus asm)
55
56 add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)
57