forked from xiph/rnnoise
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
97 lines (84 loc) · 1.87 KB
/
CMakeLists.txt
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
cmake_minimum_required(VERSION 3.16)
cmake_policy(SET CMP0076 NEW)
cmake_policy(SET CMP0091 NEW)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "Minimum OS X deployment version" FORCE)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
project(rnnoise
LANGUAGES C
DESCRIPTION "rnnoise for Telegram"
HOMEPAGE_URL "https://github.com/desktop-app/rnnoise.git"
)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT rnnoise)
include(cmake/nice_target_sources.cmake)
include(cmake/init_target.cmake)
add_library(rnnoise)
init_target(rnnoise)
get_filename_component(rnnoise_loc "." REALPATH)
nice_target_sources(rnnoise ${rnnoise_loc}/src
PRIVATE
_kiss_fft_guts.h
common.h
kiss_fft.h
rnn.c
rnn_reader.c
arch.h
compile.sh
opus_types.h
rnn.h
rnn_train.py
celt_lpc.c
denoise.c
pitch.c
rnn_data.c
tansig_table.h
celt_lpc.h
kiss_fft.c
pitch.h
rnn_data.h
)
remove_target_sources(rnnoise ${rnnoise_loc}/src
compile.sh
rnn_train.py
)
nice_target_sources(rnnoise ${rnnoise_loc}
PRIVATE
include/rnnoise.h
)
target_include_directories(rnnoise
PRIVATE
${rnnoise_loc}/include
)
set(conflicting_names
_celt_autocorr
celt_fir
celt_iir
_celt_lpc
celt_pitch_xcorr
compute_band_corr
compute_band_energy
compute_dense
compute_gru
compute_rnn
interp_band_gain
opus_fft_alloc
opus_fft_alloc_arch_c
opus_fft_alloc_twiddles
opus_fft_c
opus_fft_free
opus_fft_free_arch_c
opus_fft_impl
opus_ifft_c
pitch_downsample
pitch_filter
pitch_search
remove_doubling
)
set(replace_conflicting_names "")
foreach (entry ${conflicting_names})
list(APPEND replace_conflicting_names ${entry}=rnnoise_${entry})
endforeach()
target_compile_definitions(rnnoise
PRIVATE
_USE_MATH_DEFINES
${replace_conflicting_names}
)