aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/CMakeLists.txt
blob: 9b4976b0d81ae939366da28ba7655ce8582a91fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
add_library("kstd" STATIC)
add_library("libs::kstd" ALIAS "kstd")

set(KSTD_LIBC_SYMBOLS
    "abort"
    "strlen"
    "memcmp"
    "memcpy"
)

target_sources("kstd" PRIVATE
    "src/libc/stdlib.cpp"
    "src/libc/string.cpp"

    "src/os/error.cpp"

    "src/mutex.cpp"
)

target_sources("kstd" PUBLIC
    FILE_SET HEADERS
    BASE_DIRS "include"
    FILES
    "include/kstd/bits/format_args.hpp"
    "include/kstd/bits/format_context.hpp"
    "include/kstd/bits/format_parse_context.hpp"
    "include/kstd/bits/format_specifiers.hpp"
    "include/kstd/bits/format_string.hpp"
    "include/kstd/bits/formatter.hpp"
    "include/kstd/bits/print_sink.hpp"
    "include/kstd/bits/shared_ptr.hpp"
    "include/kstd/bits/unique_ptr.hpp"

    "include/kstd/ext/bitfield_enum"

    "include/kstd/os/error.hpp"
    "include/kstd/os/print.hpp"

    "include/kstd/asm_ptr"
    "include/kstd/cstring"
    "include/kstd/format"
    "include/kstd/memory"
    "include/kstd/mutex"
    "include/kstd/stack"
    "include/kstd/vector"
)

target_include_directories("kstd" PUBLIC
    "include"
)

list(TRANSFORM KSTD_LIBC_SYMBOLS PREPEND "-Wl,--undefined=")

target_link_options("kstd" INTERFACE ${KSTD_LIBC_SYMBOLS})