xref: /reactos/sdk/lib/rtl/CMakeLists.txt (revision 2196a06f)
1
2add_definitions(
3    -D_NTOSKRNL_
4    -DNO_RTL_INLINES
5    -D_NTSYSTEM_
6    -D_NTDLLBUILD_)
7
8if (GCC)
9    # Enable this again. CORE-17637
10    add_compile_options(-Wunused-result)
11endif()
12
13list(APPEND SOURCE
14    access.c
15    acl.c
16    actctx.c
17    appverifier.c
18    assert.c
19    atom.c
20    avltable.c
21    bitmap.c
22    bootdata.c
23    compress.c
24    crc32.c
25    critical.c
26    dbgbuffer.c
27    debug.c
28    dos8dot3.c
29    encode.c
30    env.c
31    error.c
32    exception.c
33    generictable.c
34    handle.c
35    heap.c
36    heapdbg.c
37    heappage.c
38    heapuser.c
39    image.c
40    interlck.c
41    memstream.c
42    message.c
43    largeint.c
44    luid.c
45    network.c
46    nls.c
47    path.c
48    ppb.c
49    prefix.c
50    priv.c
51    process.c
52    propvar.c
53    random.c
54    rangelist.c
55    registry.c
56    res.c
57    resource.c
58    rxact.c
59    sd.c
60    security.c
61    slist.c
62    sid.c
63    splaytree.c
64    sysvol.c
65    thread.c
66    time.c
67    timezone.c
68    timerqueue.c
69    trace.c
70    unicode.c
71    unicodeprefix.c
72    vectoreh.c
73    version.c
74    wait.c
75    workitem.c
76    rtl.h)
77
78if(ARCH STREQUAL "i386")
79    list(APPEND ASM_SOURCE
80        i386/debug_asm.S
81        i386/except_asm.s
82        i386/interlck.S
83        i386/rtlmem.s
84        i386/rtlswap.S
85        i386/res_asm.s)
86    list(APPEND SOURCE
87        i386/except.c
88        i386/thread.c)
89elseif(ARCH STREQUAL "amd64")
90    list(APPEND ASM_SOURCE
91        amd64/debug_asm.S
92        amd64/except_asm.S
93        amd64/slist.S)
94    list(APPEND SOURCE
95        bitmap64.c
96        byteswap.c
97        amd64/except.c
98        amd64/unwind.c
99        amd64/stubs.c
100        mem.c)
101elseif(ARCH STREQUAL "arm")
102    list(APPEND ASM_SOURCE arm/debug_asm.S)
103    list(APPEND SOURCE
104        arm/except.c
105        byteswap.c
106        mem.c)
107endif()
108
109add_asm_files(rtl_asm ${ASM_SOURCE})
110add_library(rtl ${SOURCE} ${rtl_asm})
111target_link_libraries(rtl PRIVATE pseh)
112add_pch(rtl rtl.h SOURCE)
113add_dependencies(rtl psdk asm)
114
115list(APPEND SOURCE_VISTA
116    condvar.c
117    runonce.c
118    srw.c
119)
120
121add_library(rtl_vista ${SOURCE_VISTA})
122add_pch(rtl_vista rtl_vista.h SOURCE_VISTA)
123add_dependencies(rtl_vista psdk)
124target_link_libraries(rtl_vista PRIVATE pseh)
125