xref: /reactos/sdk/lib/rtl/CMakeLists.txt (revision d2753d63)
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 RTL_WINE_SOURCE
14    actctx.c
15    timerqueue.c
16    wait.c
17)
18
19if(MSVC)
20    # Silence warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
21    set_source_files_properties(${RTL_WINE_SOURCE} PROPERTIES COMPILE_OPTIONS "/wd4267")
22endif()
23
24list(APPEND SOURCE
25    ${RTL_WINE_SOURCE}
26    wine_debug.c
27    access.c
28    acl.c
29    appverifier.c
30    assert.c
31    atom.c
32    avltable.c
33    bitmap.c
34    bootdata.c
35    compress.c
36    crc32.c
37    critical.c
38    dbgbuffer.c
39    debug.c
40    dos8dot3.c
41    encode.c
42    env.c
43    error.c
44    exception.c
45    generictable.c
46    handle.c
47    heap.c
48    heapdbg.c
49    heappage.c
50    heapuser.c
51    image.c
52    interlck.c
53    largeint.c
54    luid.c
55    memstream.c
56    message.c
57    network.c
58    nls.c
59    path.c
60    ppb.c
61    prefix.c
62    priv.c
63    process.c
64    propvar.c
65    random.c
66    rangelist.c
67    registry.c
68    res.c
69    resource.c
70    rxact.c
71    sd.c
72    security.c
73    sid.c
74    slist.c
75    splaytree.c
76    sysvol.c
77    thread.c
78    time.c
79    timezone.c
80    trace.c
81    unicode.c
82    unicodeprefix.c
83    vectoreh.c
84    version.c
85    workitem.c
86    rtl.h)
87
88if(ARCH STREQUAL "i386")
89    list(APPEND ASM_SOURCE
90        i386/debug_asm.S
91        i386/except_asm.s
92        i386/interlck.S
93        i386/rtlmem.s
94        i386/rtlswap.S
95        i386/res_asm.s)
96    list(APPEND SOURCE
97        i386/except.c
98        i386/thread.c)
99elseif(ARCH STREQUAL "amd64")
100    list(APPEND ASM_SOURCE
101        amd64/debug_asm.S
102        amd64/except_asm.S
103        amd64/slist.S)
104    list(APPEND SOURCE
105        bitmap64.c
106        byteswap.c
107        amd64/dynfntbl.c
108        amd64/except.c
109        amd64/unwind.c
110        amd64/stubs.c
111        mem.c)
112elseif(ARCH STREQUAL "arm")
113    list(APPEND ASM_SOURCE arm/debug_asm.S)
114    list(APPEND SOURCE
115        arm/except.c
116        byteswap.c
117        mem.c)
118endif()
119
120add_asm_files(rtl_asm ${ASM_SOURCE})
121add_library(rtl ${SOURCE} ${rtl_asm})
122target_link_libraries(rtl PRIVATE pseh)
123add_pch(rtl rtl.h SOURCE)
124add_dependencies(rtl psdk asm)
125
126list(APPEND SOURCE_VISTA
127    condvar.c
128    runonce.c
129    srw.c
130    utf8.c)
131
132add_library(rtl_vista ${SOURCE_VISTA})
133add_pch(rtl_vista rtl_vista.h SOURCE_VISTA)
134add_dependencies(rtl_vista psdk)
135target_link_libraries(rtl_vista PRIVATE pseh)
136