summaryrefslogtreecommitdiffstats
path: root/src/audio_core/CMakeLists.txt
blob: 74c1453aaf20a02cf55ba7adec8cfaba8573a2c4 (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
add_library(audio_core STATIC
    algorithm/filter.cpp
    algorithm/filter.h
    algorithm/interpolate.cpp
    algorithm/interpolate.h
    audio_out.cpp
    audio_out.h
    audio_renderer.cpp
    audio_renderer.h
    behavior_info.cpp
    behavior_info.h
    buffer.h
    codec.cpp
    codec.h
    command_generator.cpp
    command_generator.h
    common.h
    effect_context.cpp
    effect_context.h
    info_updater.cpp
    info_updater.h
    memory_pool.cpp
    memory_pool.h
    mix_context.cpp
    mix_context.h
    null_sink.h
    sink.h
    sink_context.cpp
    sink_context.h
    sink_details.cpp
    sink_details.h
    sink_stream.h
    splitter_context.cpp
    splitter_context.h
    stream.cpp
    stream.h
    time_stretch.cpp
    time_stretch.h
    voice_context.cpp
    voice_context.h

    $<$<BOOL:${ENABLE_CUBEB}>:cubeb_sink.cpp cubeb_sink.h>
)

create_target_directory_groups(audio_core)

if (NOT MSVC)
    target_compile_options(audio_core PRIVATE
        -Werror=conversion
        -Werror=ignored-qualifiers
        -Werror=implicit-fallthrough
        -Werror=reorder
        -Werror=sign-compare
        -Werror=sign-conversion
        $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter>
        $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
        -Werror=unused-variable
    )
endif()

target_link_libraries(audio_core PUBLIC common core)
target_link_libraries(audio_core PRIVATE SoundTouch)

if(ENABLE_CUBEB)
    target_link_libraries(audio_core PRIVATE cubeb)
    target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1)
endif()