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