[MSI] Enumerate only type DRIVE_FIXED CORE-17623 (& CORE-14432)
[reactos.git] / dll / ntdll / CMakeLists.txt
1
2 add_subdirectory(nt_0600)
3
4 spec2def(ntdll.dll def/ntdll.spec ADD_IMPORTLIB)
5
6 # Embed RTC libs
7 if (STACK_PROTECTOR)
8 target_sources(libntdll PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
9 endif()
10
11 add_definitions(
12 -D__NTDLL__
13 -D_NTOSKRNL_
14 -DCRTDLL)
15
16 include_directories(
17 BEFORE include
18 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/subsys)
19
20 list(APPEND SOURCE
21 csr/api.c
22 csr/capture.c
23 csr/connect.c
24 dbg/dbgui.c
25 ldr/ldrapi.c
26 ldr/ldrinit.c
27 ldr/ldrpe.c
28 ldr/ldrutils.c
29 ldr/verifier.c
30 rtl/libsupp.c
31 rtl/uilist.c
32 rtl/version.c
33 etw/trace.c)
34
35 if(ARCH STREQUAL "i386")
36 list(APPEND ASM_SOURCE dispatch/i386/dispatch.S)
37 elseif(ARCH STREQUAL "amd64")
38 list(APPEND ASM_SOURCE dispatch/amd64/dispatch.S)
39 elseif(ARCH STREQUAL "arm")
40 list(APPEND ASM_SOURCE dispatch/arm/stubs_asm.s)
41 else()
42 list(APPEND SOURCE dispatch/dispatch.c)
43 endif()
44
45 add_asm_files(ntdll_asm ${ASM_SOURCE})
46
47 list(APPEND PCH_SKIP_SOURCE
48 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c)
49
50 add_library(ntdll MODULE
51 ${SOURCE}
52 ${ntdll_asm}
53 ${PCH_SKIP_SOURCE}
54 def/ntdll.rc
55 ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
56
57 set_module_type(ntdll win32dll ENTRYPOINT 0)
58 #############################################
59 ## HACK FOR MSVC COMPILATION WITH win32dll ##
60 set_subsystem(ntdll console)
61 ################# END HACK #################
62
63 if(MSVC)
64 add_target_link_flags(ntdll "/RELEASE")
65 endif()
66
67 target_link_libraries(ntdll rtl ntdllsys libcntpr uuid ${PSEH_LIB})
68
69 if (STACK_PROTECTOR)
70 target_sources(ntdll PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
71 endif()
72
73 add_pch(ntdll include/ntdll.h "${PCH_SKIP_SOURCE}")
74 add_dependencies(ntdll ntstatus asm)
75 add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)