xref: /reactos/sdk/lib/rtl/CMakeLists.txt (revision bbccad0e)
1
2add_definitions(
3    -D_NTOSKRNL_
4    -DNO_RTL_INLINES
5    -D_NTSYSTEM_
6    -D_NTDLLBUILD_)
7
8if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
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    largeint.c
42    luid.c
43    memstream.c
44    message.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    sid.c
62    slist.c
63    splaytree.c
64    sysvol.c
65    thread.c
66    time.c
67    timerqueue.c
68    timezone.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/dynfntbl.c
98        amd64/except.c
99        amd64/unwind.c
100        amd64/stubs.c
101        mem.c)
102elseif(ARCH STREQUAL "arm")
103    list(APPEND ASM_SOURCE arm/debug_asm.S)
104    list(APPEND SOURCE
105        arm/except.c
106        byteswap.c
107        mem.c)
108endif()
109
110add_asm_files(rtl_asm ${ASM_SOURCE})
111add_library(rtl ${SOURCE} ${rtl_asm})
112target_link_libraries(rtl PRIVATE pseh)
113add_pch(rtl rtl.h SOURCE)
114add_dependencies(rtl psdk asm)
115
116list(APPEND SOURCE_VISTA
117    condvar.c
118    runonce.c
119    srw.c
120    utf8.c)
121
122add_library(rtl_vista ${SOURCE_VISTA})
123add_pch(rtl_vista rtl_vista.h SOURCE_VISTA)
124add_dependencies(rtl_vista psdk)
125target_link_libraries(rtl_vista PRIVATE pseh)
126