aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/CMakeLists.txt
blob: d83e70446835fcf3d67582c81ffcbf7de746cf51 (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
add_library("kstd" STATIC)
add_library("libs::kstd" ALIAS "kstd")

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

target_sources("kstd" PRIVATE
    "src/bits/os.cpp"
    "src/libc/stdlib.cpp"
    "src/libc/string.cpp"
    "src/mutex.cpp"
)

target_sources("kstd" PUBLIC
    FILE_SET HEADERS
    BASE_DIRS "include"
    FILES
    "include/kstd/bits/os.hpp"
    "include/kstd/bits/shared_ptr.hpp"
    "include/kstd/bits/unique_ptr.hpp"

    "include/kstd/ext/bitfield_enum"

    "include/kstd/asm_ptr"
    "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})