13d9541f59a757c09f6268455a16bb3fa917fc34
[reactos.git] / reactos / 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
13 list(APPEND SOURCE
14 csr/api.c
15 csr/capture.c
16 csr/connect.c
17 dbg/dbgui.c
18 ldr/ldrapi.c
19 ldr/ldrinit.c
20 ldr/ldrpe.c
21 ldr/ldrutils.c
22 rtl/libsupp.c
23 rtl/version.c
24 def/ntdll.rc
25 ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
26
27 if(ARCH MATCHES i386)
28 list(APPEND SOURCE dispatch/i386/dispatch.S)
29 elseif(ARCH MATCHES amd64)
30 list(APPEND SOURCE dispatch/amd64/dispatch.S)
31 elseif(ARCH MATCHES arm)
32 list(APPEND SOURCE dispatch/arm/stubs_asm.s)
33 else()
34 list(APPEND SOURCE dispatch/dispatch.c)
35 endif(ARCH MATCHES i386)
36
37 add_library(ntdll SHARED ${SOURCE})
38
39 set_module_type(ntdll win32dll ENTRYPOINT 0)
40
41 if(MSVC)
42 add_target_link_flags(ntdll "/RELEASE")
43 endif()
44
45 target_link_libraries(ntdll
46 rtl
47 ntdllsys
48 libcntpr
49 ${PSEH_LIB})
50
51 add_pch(ntdll include/ntdll.h)
52 add_dependencies(ntdll ntstatus asm)
53
54 add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)
55