diff options
Diffstat (limited to 'externals')
| -rw-r--r-- | externals/CMakeLists.txt | 27 | ||||
| m--------- | externals/Vulkan-Headers | 0 | ||||
| m--------- | externals/dynarmic | 0 | ||||
| -rw-r--r-- | externals/find-modules/FindLibUSB.cmake | 43 | ||||
| m--------- | externals/libressl | 0 | ||||
| m--------- | externals/libusb | 0 | ||||
| -rw-r--r-- | externals/opus/CMakeLists.txt | 254 | ||||
| m--------- | externals/opus/opus | 0 | ||||
| m--------- | externals/sirit | 0 |
9 files changed, 316 insertions, 8 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index df7a5e0a9..d1dcc403b 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -4,6 +4,13 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules") | |||
| 4 | list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/externals/find-modules") | 4 | list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/externals/find-modules") |
| 5 | include(DownloadExternals) | 5 | include(DownloadExternals) |
| 6 | 6 | ||
| 7 | # xbyak | ||
| 8 | if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) | ||
| 9 | add_library(xbyak INTERFACE) | ||
| 10 | target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak) | ||
| 11 | target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES) | ||
| 12 | endif() | ||
| 13 | |||
| 7 | # Catch | 14 | # Catch |
| 8 | add_library(catch-single-include INTERFACE) | 15 | add_library(catch-single-include INTERFACE) |
| 9 | target_include_directories(catch-single-include INTERFACE catch/single_include) | 16 | target_include_directories(catch-single-include INTERFACE catch/single_include) |
| @@ -66,6 +73,15 @@ if (NOT LIBZIP_FOUND) | |||
| 66 | endif() | 73 | endif() |
| 67 | 74 | ||
| 68 | if (ENABLE_WEB_SERVICE) | 75 | if (ENABLE_WEB_SERVICE) |
| 76 | # LibreSSL | ||
| 77 | set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "") | ||
| 78 | add_subdirectory(libressl EXCLUDE_FROM_ALL) | ||
| 79 | target_include_directories(ssl INTERFACE ./libressl/include) | ||
| 80 | target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP) | ||
| 81 | get_directory_property(OPENSSL_LIBRARIES | ||
| 82 | DIRECTORY libressl | ||
| 83 | DEFINITION OPENSSL_LIBS) | ||
| 84 | |||
| 69 | # lurlparser | 85 | # lurlparser |
| 70 | add_subdirectory(lurlparser EXCLUDE_FROM_ALL) | 86 | add_subdirectory(lurlparser EXCLUDE_FROM_ALL) |
| 71 | 87 | ||
| @@ -73,13 +89,8 @@ if (ENABLE_WEB_SERVICE) | |||
| 73 | add_library(httplib INTERFACE) | 89 | add_library(httplib INTERFACE) |
| 74 | target_include_directories(httplib INTERFACE ./httplib) | 90 | target_include_directories(httplib INTERFACE ./httplib) |
| 75 | target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT) | 91 | target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT) |
| 76 | target_link_libraries(httplib INTERFACE OpenSSL::SSL OpenSSL::Crypto) | 92 | target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES}) |
| 77 | endif() | 93 | endif() |
| 78 | 94 | ||
| 79 | if (NOT TARGET xbyak) | 95 | # Opus |
| 80 | if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) | 96 | add_subdirectory(opus) |
| 81 | add_library(xbyak INTERFACE) | ||
| 82 | target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak) | ||
| 83 | target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES) | ||
| 84 | endif() | ||
| 85 | endif() | ||
diff --git a/externals/Vulkan-Headers b/externals/Vulkan-Headers | |||
| Subproject 9250d5ae8f50202005233dc0512a1d460c8b483 | Subproject 8188e3fbbc105591064093440f88081fb957d4f | ||
diff --git a/externals/dynarmic b/externals/dynarmic | |||
| Subproject e7166e8ba74d7b9c85e87afc0aaf667e7e84cfe | Subproject 4f967387c07365b7ea35d2fa3e19b7df8872a09 | ||
diff --git a/externals/find-modules/FindLibUSB.cmake b/externals/find-modules/FindLibUSB.cmake new file mode 100644 index 000000000..dec0b98b0 --- /dev/null +++ b/externals/find-modules/FindLibUSB.cmake | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | # - Find libusb-1.0 library | ||
| 2 | # This module defines | ||
| 3 | # LIBUSB_INCLUDE_DIR, where to find bluetooth.h | ||
| 4 | # LIBUSB_LIBRARIES, the libraries needed to use libusb-1.0. | ||
| 5 | # LIBUSB_FOUND, If false, do not try to use libusb-1.0. | ||
| 6 | # | ||
| 7 | # Copyright (c) 2009, Michal Cihar, <michal@cihar.com> | ||
| 8 | # | ||
| 9 | # vim: expandtab sw=4 ts=4 sts=4: | ||
| 10 | |||
| 11 | if(ANDROID) | ||
| 12 | set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") | ||
| 13 | message(STATUS "libusb-1.0 not found.") | ||
| 14 | elseif (NOT LIBUSB_FOUND) | ||
| 15 | pkg_check_modules (LIBUSB_PKG libusb-1.0) | ||
| 16 | |||
| 17 | find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h | ||
| 18 | PATHS | ||
| 19 | ${LIBUSB_PKG_INCLUDE_DIRS} | ||
| 20 | /usr/include/libusb-1.0 | ||
| 21 | /usr/include | ||
| 22 | /usr/local/include/libusb-1.0 | ||
| 23 | /usr/local/include | ||
| 24 | ) | ||
| 25 | |||
| 26 | find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb | ||
| 27 | PATHS | ||
| 28 | ${LIBUSB_PKG_LIBRARY_DIRS} | ||
| 29 | /usr/lib | ||
| 30 | /usr/local/lib | ||
| 31 | ) | ||
| 32 | |||
| 33 | if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) | ||
| 34 | set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found") | ||
| 35 | message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}") | ||
| 36 | else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) | ||
| 37 | set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") | ||
| 38 | message(STATUS "libusb-1.0 not found.") | ||
| 39 | endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) | ||
| 40 | |||
| 41 | mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) | ||
| 42 | endif () | ||
| 43 | |||
diff --git a/externals/libressl b/externals/libressl new file mode 160000 | |||
| Subproject 7d01cb01cb1a926ecb4c9c98b107ef3c26f59df | |||
diff --git a/externals/libusb b/externals/libusb new file mode 160000 | |||
| Subproject 3406d72cda879f8792a88bf5f6bd0b7a65636f7 | |||
diff --git a/externals/opus/CMakeLists.txt b/externals/opus/CMakeLists.txt new file mode 100644 index 000000000..94a86551f --- /dev/null +++ b/externals/opus/CMakeLists.txt | |||
| @@ -0,0 +1,254 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.8) | ||
| 2 | |||
| 3 | project(opus) | ||
| 4 | |||
| 5 | option(OPUS_STACK_PROTECTOR "Use stack protection" OFF) | ||
| 6 | option(OPUS_USE_ALLOCA "Use alloca for stack arrays (on non-C99 compilers)" OFF) | ||
| 7 | option(OPUS_CUSTOM_MODES "Enable non-Opus modes, e.g. 44.1 kHz & 2^n frames" OFF) | ||
| 8 | option(OPUS_FIXED_POINT "Compile as fixed-point (for machines without a fast enough FPU)" OFF) | ||
| 9 | option(OPUS_ENABLE_FLOAT_API "Compile with the floating point API (for machines with float library" ON) | ||
| 10 | |||
| 11 | include(opus/opus_functions.cmake) | ||
| 12 | |||
| 13 | if(OPUS_STACK_PROTECTOR) | ||
| 14 | if(NOT MSVC) # GC on by default on MSVC | ||
| 15 | check_and_set_flag(STACK_PROTECTION_STRONG -fstack-protector-strong) | ||
| 16 | endif() | ||
| 17 | else() | ||
| 18 | if(MSVC) | ||
| 19 | check_and_set_flag(BUFFER_SECURITY_CHECK /GS-) | ||
| 20 | endif() | ||
| 21 | endif() | ||
| 22 | |||
| 23 | add_library(opus STATIC | ||
| 24 | # CELT sources | ||
| 25 | opus/celt/bands.c | ||
| 26 | opus/celt/celt.c | ||
| 27 | opus/celt/celt_decoder.c | ||
| 28 | opus/celt/celt_encoder.c | ||
| 29 | opus/celt/celt_lpc.c | ||
| 30 | opus/celt/cwrs.c | ||
| 31 | opus/celt/entcode.c | ||
| 32 | opus/celt/entdec.c | ||
| 33 | opus/celt/entenc.c | ||
| 34 | opus/celt/kiss_fft.c | ||
| 35 | opus/celt/laplace.c | ||
| 36 | opus/celt/mathops.c | ||
| 37 | opus/celt/mdct.c | ||
| 38 | opus/celt/modes.c | ||
| 39 | opus/celt/pitch.c | ||
| 40 | opus/celt/quant_bands.c | ||
| 41 | opus/celt/rate.c | ||
| 42 | opus/celt/vq.c | ||
| 43 | |||
| 44 | # SILK sources | ||
| 45 | opus/silk/A2NLSF.c | ||
| 46 | opus/silk/CNG.c | ||
| 47 | opus/silk/HP_variable_cutoff.c | ||
| 48 | opus/silk/LPC_analysis_filter.c | ||
| 49 | opus/silk/LPC_fit.c | ||
| 50 | opus/silk/LPC_inv_pred_gain.c | ||
| 51 | opus/silk/LP_variable_cutoff.c | ||
| 52 | opus/silk/NLSF2A.c | ||
| 53 | opus/silk/NLSF_VQ.c | ||
| 54 | opus/silk/NLSF_VQ_weights_laroia.c | ||
| 55 | opus/silk/NLSF_decode.c | ||
| 56 | opus/silk/NLSF_del_dec_quant.c | ||
| 57 | opus/silk/NLSF_encode.c | ||
| 58 | opus/silk/NLSF_stabilize.c | ||
| 59 | opus/silk/NLSF_unpack.c | ||
| 60 | opus/silk/NSQ.c | ||
| 61 | opus/silk/NSQ_del_dec.c | ||
| 62 | opus/silk/PLC.c | ||
| 63 | opus/silk/VAD.c | ||
| 64 | opus/silk/VQ_WMat_EC.c | ||
| 65 | opus/silk/ana_filt_bank_1.c | ||
| 66 | opus/silk/biquad_alt.c | ||
| 67 | opus/silk/bwexpander.c | ||
| 68 | opus/silk/bwexpander_32.c | ||
| 69 | opus/silk/check_control_input.c | ||
| 70 | opus/silk/code_signs.c | ||
| 71 | opus/silk/control_SNR.c | ||
| 72 | opus/silk/control_audio_bandwidth.c | ||
| 73 | opus/silk/control_codec.c | ||
| 74 | opus/silk/dec_API.c | ||
| 75 | opus/silk/decode_core.c | ||
| 76 | opus/silk/decode_frame.c | ||
| 77 | opus/silk/decode_indices.c | ||
| 78 | opus/silk/decode_parameters.c | ||
| 79 | opus/silk/decode_pitch.c | ||
| 80 | opus/silk/decode_pulses.c | ||
| 81 | opus/silk/decoder_set_fs.c | ||
| 82 | opus/silk/enc_API.c | ||
| 83 | opus/silk/encode_indices.c | ||
| 84 | opus/silk/encode_pulses.c | ||
| 85 | opus/silk/gain_quant.c | ||
| 86 | opus/silk/init_decoder.c | ||
| 87 | opus/silk/init_encoder.c | ||
| 88 | opus/silk/inner_prod_aligned.c | ||
| 89 | opus/silk/interpolate.c | ||
| 90 | opus/silk/lin2log.c | ||
| 91 | opus/silk/log2lin.c | ||
| 92 | opus/silk/pitch_est_tables.c | ||
| 93 | opus/silk/process_NLSFs.c | ||
| 94 | opus/silk/quant_LTP_gains.c | ||
| 95 | opus/silk/resampler.c | ||
| 96 | opus/silk/resampler_down2.c | ||
| 97 | opus/silk/resampler_down2_3.c | ||
| 98 | opus/silk/resampler_private_AR2.c | ||
| 99 | opus/silk/resampler_private_IIR_FIR.c | ||
| 100 | opus/silk/resampler_private_down_FIR.c | ||
| 101 | opus/silk/resampler_private_up2_HQ.c | ||
| 102 | opus/silk/resampler_rom.c | ||
| 103 | opus/silk/shell_coder.c | ||
| 104 | opus/silk/sigm_Q15.c | ||
| 105 | opus/silk/sort.c | ||
| 106 | opus/silk/stereo_LR_to_MS.c | ||
| 107 | opus/silk/stereo_MS_to_LR.c | ||
| 108 | opus/silk/stereo_decode_pred.c | ||
| 109 | opus/silk/stereo_encode_pred.c | ||
| 110 | opus/silk/stereo_find_predictor.c | ||
| 111 | opus/silk/stereo_quant_pred.c | ||
| 112 | opus/silk/sum_sqr_shift.c | ||
| 113 | opus/silk/table_LSF_cos.c | ||
| 114 | opus/silk/tables_LTP.c | ||
| 115 | opus/silk/tables_NLSF_CB_NB_MB.c | ||
| 116 | opus/silk/tables_NLSF_CB_WB.c | ||
| 117 | opus/silk/tables_gain.c | ||
| 118 | opus/silk/tables_other.c | ||
| 119 | opus/silk/tables_pitch_lag.c | ||
| 120 | opus/silk/tables_pulses_per_block.c | ||
| 121 | |||
| 122 | # Opus sources | ||
| 123 | opus/src/analysis.c | ||
| 124 | opus/src/mapping_matrix.c | ||
| 125 | opus/src/mlp.c | ||
| 126 | opus/src/mlp_data.c | ||
| 127 | opus/src/opus.c | ||
| 128 | opus/src/opus_decoder.c | ||
| 129 | opus/src/opus_encoder.c | ||
| 130 | opus/src/opus_multistream.c | ||
| 131 | opus/src/opus_multistream_decoder.c | ||
| 132 | opus/src/opus_multistream_encoder.c | ||
| 133 | opus/src/opus_projection_decoder.c | ||
| 134 | opus/src/opus_projection_encoder.c | ||
| 135 | opus/src/repacketizer.c | ||
| 136 | ) | ||
| 137 | |||
| 138 | if (DEBUG) | ||
| 139 | target_sources(opus PRIVATE opus/silk/debug.c) | ||
| 140 | endif() | ||
| 141 | |||
| 142 | if (OPUS_FIXED_POINT) | ||
| 143 | target_sources(opus PRIVATE | ||
| 144 | opus/silk/fixed/LTP_analysis_filter_FIX.c | ||
| 145 | opus/silk/fixed/LTP_scale_ctrl_FIX.c | ||
| 146 | opus/silk/fixed/apply_sine_window_FIX.c | ||
| 147 | opus/silk/fixed/autocorr_FIX.c | ||
| 148 | opus/silk/fixed/burg_modified_FIX.c | ||
| 149 | opus/silk/fixed/corrMatrix_FIX.c | ||
| 150 | opus/silk/fixed/encode_frame_FIX.c | ||
| 151 | opus/silk/fixed/find_LPC_FIX.c | ||
| 152 | opus/silk/fixed/find_LTP_FIX.c | ||
| 153 | opus/silk/fixed/find_pitch_lags_FIX.c | ||
| 154 | opus/silk/fixed/find_pred_coefs_FIX.c | ||
| 155 | opus/silk/fixed/k2a_FIX.c | ||
| 156 | opus/silk/fixed/k2a_Q16_FIX.c | ||
| 157 | opus/silk/fixed/noise_shape_analysis_FIX.c | ||
| 158 | opus/silk/fixed/pitch_analysis_core_FIX.c | ||
| 159 | opus/silk/fixed/prefilter_FIX.c | ||
| 160 | opus/silk/fixed/process_gains_FIX.c | ||
| 161 | opus/silk/fixed/regularize_correlations_FIX.c | ||
| 162 | opus/silk/fixed/residual_energy16_FIX.c | ||
| 163 | opus/silk/fixed/residual_energy_FIX.c | ||
| 164 | opus/silk/fixed/schur64_FIX.c | ||
| 165 | opus/silk/fixed/schur_FIX.c | ||
| 166 | opus/silk/fixed/solve_LS_FIX.c | ||
| 167 | opus/silk/fixed/vector_ops_FIX.c | ||
| 168 | opus/silk/fixed/warped_autocorrelation_FIX.c | ||
| 169 | ) | ||
| 170 | else() | ||
| 171 | target_sources(opus PRIVATE | ||
| 172 | opus/silk/float/LPC_analysis_filter_FLP.c | ||
| 173 | opus/silk/float/LPC_inv_pred_gain_FLP.c | ||
| 174 | opus/silk/float/LTP_analysis_filter_FLP.c | ||
| 175 | opus/silk/float/LTP_scale_ctrl_FLP.c | ||
| 176 | opus/silk/float/apply_sine_window_FLP.c | ||
| 177 | opus/silk/float/autocorrelation_FLP.c | ||
| 178 | opus/silk/float/burg_modified_FLP.c | ||
| 179 | opus/silk/float/bwexpander_FLP.c | ||
| 180 | opus/silk/float/corrMatrix_FLP.c | ||
| 181 | opus/silk/float/encode_frame_FLP.c | ||
| 182 | opus/silk/float/energy_FLP.c | ||
| 183 | opus/silk/float/find_LPC_FLP.c | ||
| 184 | opus/silk/float/find_LTP_FLP.c | ||
| 185 | opus/silk/float/find_pitch_lags_FLP.c | ||
| 186 | opus/silk/float/find_pred_coefs_FLP.c | ||
| 187 | opus/silk/float/inner_product_FLP.c | ||
| 188 | opus/silk/float/k2a_FLP.c | ||
| 189 | opus/silk/float/noise_shape_analysis_FLP.c | ||
| 190 | opus/silk/float/pitch_analysis_core_FLP.c | ||
| 191 | opus/silk/float/process_gains_FLP.c | ||
| 192 | opus/silk/float/regularize_correlations_FLP.c | ||
| 193 | opus/silk/float/residual_energy_FLP.c | ||
| 194 | opus/silk/float/scale_copy_vector_FLP.c | ||
| 195 | opus/silk/float/scale_vector_FLP.c | ||
| 196 | opus/silk/float/schur_FLP.c | ||
| 197 | opus/silk/float/sort_FLP.c | ||
| 198 | opus/silk/float/warped_autocorrelation_FLP.c | ||
| 199 | opus/silk/float/wrappers_FLP.c | ||
| 200 | ) | ||
| 201 | endif() | ||
| 202 | |||
| 203 | target_compile_definitions(opus PRIVATE OPUS_BUILD ENABLE_HARDENING) | ||
| 204 | |||
| 205 | if(NOT MSVC) | ||
| 206 | if(MINGW) | ||
| 207 | target_compile_definitions(opus PRIVATE _FORTIFY_SOURCE=0) | ||
| 208 | else() | ||
| 209 | target_compile_definitions(opus PRIVATE _FORTIFY_SOURCE=2) | ||
| 210 | endif() | ||
| 211 | endif() | ||
| 212 | |||
| 213 | # It is strongly recommended to uncomment one of these VAR_ARRAYS: Use C99 | ||
| 214 | # variable-length arrays for stack allocation USE_ALLOCA: Use alloca() for stack | ||
| 215 | # allocation If none is defined, then the fallback is a non-threadsafe global | ||
| 216 | # array | ||
| 217 | if(OPUS_USE_ALLOCA OR MSVC) | ||
| 218 | target_compile_definitions(opus PRIVATE USE_ALLOCA) | ||
| 219 | else() | ||
| 220 | target_compile_definitions(opus PRIVATE VAR_ARRAYS) | ||
| 221 | endif() | ||
| 222 | |||
| 223 | if(OPUS_CUSTOM_MODES) | ||
| 224 | target_compile_definitions(opus PRIVATE CUSTOM_MODES) | ||
| 225 | endif() | ||
| 226 | |||
| 227 | if(NOT OPUS_ENABLE_FLOAT_API) | ||
| 228 | target_compile_definitions(opus PRIVATE DISABLE_FLOAT_API) | ||
| 229 | endif() | ||
| 230 | |||
| 231 | target_compile_definitions(opus | ||
| 232 | PUBLIC | ||
| 233 | -DOPUS_VERSION="\\"1.3.1\\"" | ||
| 234 | |||
| 235 | PRIVATE | ||
| 236 | # Use C99 intrinsics to speed up float-to-int conversion | ||
| 237 | HAVE_LRINTF | ||
| 238 | ) | ||
| 239 | |||
| 240 | if (FIXED_POINT) | ||
| 241 | target_compile_definitions(opus PRIVATE -DFIXED_POINT=1 -DDISABLE_FLOAT_API) | ||
| 242 | endif() | ||
| 243 | |||
| 244 | target_include_directories(opus | ||
| 245 | PUBLIC | ||
| 246 | opus/include | ||
| 247 | |||
| 248 | PRIVATE | ||
| 249 | opus/celt | ||
| 250 | opus/silk | ||
| 251 | opus/silk/fixed | ||
| 252 | opus/silk/float | ||
| 253 | opus/src | ||
| 254 | ) | ||
diff --git a/externals/opus/opus b/externals/opus/opus new file mode 160000 | |||
| Subproject ad8fe90db79b7d2a135e3dfd2ed6631b0c5662a | |||
diff --git a/externals/sirit b/externals/sirit | |||
| Subproject a62c5bbc100a5e5a31ea0ccc4a78d8fa6a4167c | Subproject eefca56afd49379bdebc97ded8b480839f93088 | ||