aboutsummaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
blob: 66218d8d1047ae3906bcd7b91198ce8530ffe616 (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
68
69
70
71
72
73
74
75
76
77
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)

set (CMAKE_CXX_STANDARD 11)
set (CMAKE_C_STANDARD 11)

include_directories(
    "../src/lib"
)

if (ATDE_USE_FLOAT)
    add_compile_definitions(ATDE_USE_FLOAT)
endif()

set(atracdenc_ut
    ${CMAKE_SOURCE_DIR}/src/lib/mdct/mdct_ut.cpp
    ${CMAKE_SOURCE_DIR}/src/lib/bitstream/bitstream_ut.cpp
    ${CMAKE_SOURCE_DIR}/src/util_ut.cpp
    ${CMAKE_SOURCE_DIR}/src/atracdenc_ut.cpp
    ${CMAKE_SOURCE_DIR}/src/transient_detector_ut.cpp
)

add_executable(atracdenc_ut ${atracdenc_ut})

target_link_libraries(atracdenc_ut
    bitstream
    fft_impl
    atracdenc_impl
    oma
    GTest::gtest_main
)

configure_file(
    ${CMAKE_SOURCE_DIR}/src/atrac/atrac3plus_pqf/ut/test_data/ipqftest_pcm_mr.dat
    ${CMAKE_CURRENT_BINARY_DIR}/test_data/ipqftest_pcm_mr.dat
    COPYONLY
)

configure_file(
    ${CMAKE_SOURCE_DIR}/src/atrac/atrac3plus_pqf/ut/test_data/ipqftest_pcm_out.dat
    ${CMAKE_CURRENT_BINARY_DIR}/test_data/ipqftest_pcm_out.dat
    COPYONLY
)

set(at3plus_pqf_ut
    ${CMAKE_SOURCE_DIR}/src/atrac/atrac3plus_pqf/ut/ipqf_ut.cpp
    ${CMAKE_SOURCE_DIR}/src/atrac/atrac3plus_pqf/ut/atrac3plusdsp.c
    ${CMAKE_SOURCE_DIR}/src/atrac/atrac3plus_pqf/atrac3plus_pqf.c
    ${CMAKE_SOURCE_DIR}/src/lib/mdct/mdct.cpp
)

add_executable(at3plus_pqf_ut ${at3plus_pqf_ut})

target_link_libraries(at3plus_pqf_ut
    m
    fft_impl
    GTest::gtest_main
)

###

set(at3plus_bitstream_ut
    ${CMAKE_SOURCE_DIR}/src/atrac/at3p/at3p_bitstream_ut.cpp
)

add_executable(at3plus_bitstream_ut ${at3plus_bitstream_ut})

target_link_libraries(at3plus_bitstream_ut
    m
    fft_impl
    atracdenc_impl
    GTest::gtest_main
)

enable_testing()
add_test(ut atracdenc_ut)
add_test(at3plus_pqf_ut at3plus_pqf_ut)
add_test(at3plus_bitstream_ut at3plus_bitstream_ut)