Browse Source
Replace externals with Conan (#3735)
Replace externals with Conan (#3735)
* Remove git submodules that will be loaded through conan * Move custom Find modules to their own folder * Use conan for downloading missing external dependencies * CI: Change the yuzu source folder user to the user that the containers run on * Attempt to remove dirty mingw build hack * Install conan on the msvc build * Only set release build type when using not using multi config generator * Re-add qt bundled to workaround an issue with conan qt not downloading prebuilt binaries * Add workaround for submodules that use legacy CMAKE variables * Re-add USE_BUNDLED_QT on the msvc build botpull/15/merge
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 567 additions and 17852 deletions
-
3.ci/scripts/format/exec.sh
-
3.ci/scripts/linux/exec.sh
-
12.ci/scripts/windows/docker.sh
-
3.ci/scripts/windows/exec.sh
-
4.ci/templates/build-msvc.yml
-
30.gitmodules
-
273CMakeLists.txt
-
87externals/CMakeLists.txt
-
1externals/boost
-
1externals/catch
-
35externals/find-modules/FindCatch2.cmake
-
69externals/find-modules/FindLibzip.cmake
-
0externals/find-modules/FindUnicorn.cmake
-
43externals/find-modules/Findfmt.cmake
-
54externals/find-modules/Findlz4.cmake
-
35externals/find-modules/Findnlohmann_json.cmake
-
42externals/find-modules/Findopus.cmake
-
41externals/find-modules/Findzstd.cmake
-
1externals/fmt
-
9externals/json/README.md
-
17300externals/json/json.hpp
-
1externals/libressl
-
1externals/lz4
-
254externals/opus/CMakeLists.txt
-
1externals/opus/opus
-
81externals/zlib/CMakeLists.txt
-
1externals/zlib/zlib
-
1externals/zstd
-
4src/common/CMakeLists.txt
-
4src/core/CMakeLists.txt
-
2src/core/hle/service/bcat/backend/boxcat.cpp
-
3src/core/reporter.cpp
-
2src/web_service/CMakeLists.txt
-
2src/web_service/telemetry_json.cpp
-
2src/web_service/verify_login.cpp
@ -1,4 +1,7 @@ |
|||
#!/bin/bash -ex |
|||
|
|||
chmod a+x ./.ci/scripts/format/docker.sh |
|||
# the UID for the container yuzu user is 1027 |
|||
sudo chown -R 1027 ./ |
|||
docker run -v $(pwd):/yuzu yuzuemu/build-environments:linux-clang-format /bin/bash -ex /yuzu/.ci/scripts/format/docker.sh |
|||
sudo chown -R $UID ./ |
|||
@ -1,54 +1,30 @@ |
|||
[submodule "inih"] |
|||
path = externals/inih/inih |
|||
url = https://github.com/svn2github/inih |
|||
[submodule "boost"] |
|||
path = externals/boost |
|||
url = https://github.com/yuzu-emu/ext-boost.git |
|||
[submodule "catch"] |
|||
path = externals/catch |
|||
url = https://github.com/philsquared/Catch.git |
|||
[submodule "cubeb"] |
|||
path = externals/cubeb |
|||
url = https://github.com/kinetiknz/cubeb.git |
|||
[submodule "dynarmic"] |
|||
path = externals/dynarmic |
|||
url = https://github.com/MerryMage/dynarmic.git |
|||
[submodule "fmt"] |
|||
path = externals/fmt |
|||
url = https://github.com/fmtlib/fmt.git |
|||
[submodule "lz4"] |
|||
path = externals/lz4 |
|||
url = https://github.com/lz4/lz4.git |
|||
[submodule "unicorn"] |
|||
path = externals/unicorn |
|||
url = https://github.com/yuzu-emu/unicorn |
|||
[submodule "mbedtls"] |
|||
path = externals/mbedtls |
|||
url = https://github.com/DarkLordZach/mbedtls |
|||
[submodule "opus"] |
|||
path = externals/opus/opus |
|||
url = https://github.com/xiph/opus.git |
|||
[submodule "soundtouch"] |
|||
path = externals/soundtouch |
|||
url = https://github.com/citra-emu/ext-soundtouch.git |
|||
[submodule "libressl"] |
|||
path = externals/libressl |
|||
url = https://github.com/citra-emu/ext-libressl-portable.git |
|||
[submodule "discord-rpc"] |
|||
path = externals/discord-rpc |
|||
url = https://github.com/discordapp/discord-rpc.git |
|||
[submodule "Vulkan-Headers"] |
|||
path = externals/Vulkan-Headers |
|||
url = https://github.com/KhronosGroup/Vulkan-Headers.git |
|||
[submodule "externals/zstd"] |
|||
path = externals/zstd |
|||
url = https://github.com/facebook/zstd |
|||
[submodule "sirit"] |
|||
path = externals/sirit |
|||
url = https://github.com/ReinUsesLisp/sirit |
|||
[submodule "mbedtls"] |
|||
path = externals/mbedtls |
|||
url = https://github.com/DarkLordZach/mbedtls |
|||
[submodule "libzip"] |
|||
path = externals/libzip/libzip |
|||
url = https://github.com/nih-at/libzip.git |
|||
[submodule "zlib"] |
|||
path = externals/zlib/zlib |
|||
url = https://github.com/madler/zlib.git |
|||
@ -0,0 +1,35 @@ |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PC_Catch2 QUIET Catch2) |
|||
|
|||
find_path(Catch2_INCLUDE_DIR |
|||
NAMES catch.hpp |
|||
PATHS ${PC_Catch2_INCLUDE_DIRS} ${CONAN_CATCH2_ROOT} |
|||
PATH_SUFFIXES catch2 |
|||
) |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(Catch2 |
|||
FOUND_VAR Catch2_FOUND |
|||
REQUIRED_VARS |
|||
Catch2_INCLUDE_DIR |
|||
VERSION_VAR Catch2_VERSION |
|||
) |
|||
|
|||
if(Catch2_FOUND) |
|||
set(Catch2_INCLUDE_DIRS ${Catch2_INCLUDE_DIR}) |
|||
set(Catch2_DEFINITIONS ${PC_Catch2_CFLAGS_OTHER}) |
|||
endif() |
|||
|
|||
if(Catch2_FOUND AND NOT TARGET Catch2::Catch2) |
|||
add_library(Catch2::Catch2 UNKNOWN IMPORTED) |
|||
set_target_properties(Catch2::Catch2 PROPERTIES |
|||
IMPORTED_LOCATION "${Catch2_LIBRARY}" |
|||
INTERFACE_COMPILE_OPTIONS "${PC_Catch2_CFLAGS_OTHER}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${Catch2_INCLUDE_DIR}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
Catch2_INCLUDE_DIR |
|||
) |
|||
@ -0,0 +1,69 @@ |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PC_LIBZIP QUIET libzip) |
|||
|
|||
find_path(LIBZIP_INCLUDE_DIR |
|||
NAMES zip.h |
|||
PATHS ${PC_LIBZIP_INCLUDE_DIRS} |
|||
"$ENV{LIB_DIR}/include" |
|||
"$ENV{INCLUDE}" |
|||
/usr/local/include |
|||
/usr/include |
|||
) |
|||
find_path(LIBZIP_INCLUDE_DIR_ZIPCONF |
|||
NAMES zipconf.h |
|||
HINTS ${PC_LIBZIP_INCLUDE_DIRS} |
|||
"$ENV{LIB_DIR}/include" |
|||
"$ENV{LIB_DIR}/lib/libzip/include" |
|||
"$ENV{LIB}/lib/libzip/include" |
|||
/usr/local/lib/libzip/include |
|||
/usr/lib/libzip/include |
|||
/usr/local/include |
|||
/usr/include |
|||
"$ENV{INCLUDE}" |
|||
) |
|||
find_library(LIBZIP_LIBRARY |
|||
NAMES zip |
|||
PATHS ${PC_LIBZIP_LIBRARY_DIRS} |
|||
"$ENV{LIB_DIR}/lib" "$ENV{LIB}" /usr/local/lib /usr/lib |
|||
) |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(Libzip |
|||
FOUND_VAR LIBZIP_FOUND |
|||
REQUIRED_VARS |
|||
LIBZIP_LIBRARY |
|||
LIBZIP_INCLUDE_DIR |
|||
LIBZIP_INCLUDE_DIR_ZIPCONF |
|||
) |
|||
|
|||
set(LIBZIP_VERSION 0) |
|||
|
|||
if (LIBZIP_INCLUDE_DIR_ZIPCONF) |
|||
FILE(READ "${LIBZIP_INCLUDE_DIR_ZIPCONF}/zipconf.h" _LIBZIP_VERSION_CONTENTS) |
|||
if (_LIBZIP_VERSION_CONTENTS) |
|||
STRING(REGEX REPLACE ".*#define LIBZIP_VERSION \"([0-9.]+)\".*" "\\1" LIBZIP_VERSION "${_LIBZIP_VERSION_CONTENTS}") |
|||
endif() |
|||
endif() |
|||
|
|||
set(LIBZIP_VERSION ${LIBZIP_VERSION} CACHE STRING "Version number of libzip") |
|||
|
|||
if(LIBZIP_FOUND) |
|||
set(LIBZIP_LIBRARIES ${LIBZIP_LIBRARY}) |
|||
set(LIBZIP_INCLUDE_DIRS ${LIBZIP_INCLUDE_DIR}) |
|||
set(LIBZIP_DEFINITIONS ${PC_LIBZIP_CFLAGS_OTHER}) |
|||
endif() |
|||
|
|||
if(LIBZIP_FOUND AND NOT TARGET libzip::libzip) |
|||
add_library(libzip::libzip UNKNOWN IMPORTED) |
|||
set_target_properties(libzip::libzip PROPERTIES |
|||
IMPORTED_LOCATION "${LIBZIP_LIBRARY}" |
|||
INTERFACE_COMPILE_OPTIONS "${PC_LIBZIP_CFLAGS_OTHER}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${LIBZIP_INCLUDE_DIR}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
LIBZIP_INCLUDE_DIR |
|||
LIBZIP_LIBRARY |
|||
) |
|||
@ -0,0 +1,43 @@ |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PC_fmt QUIET fmt) |
|||
|
|||
find_path(fmt_INCLUDE_DIR |
|||
NAMES format.h |
|||
PATHS ${PC_fmt_INCLUDE_DIRS} ${CONAN_INCLUDE_DIRS_fmt} |
|||
PATH_SUFFIXES fmt |
|||
) |
|||
|
|||
find_library(fmt_LIBRARY |
|||
NAMES fmt |
|||
PATHS ${PC_fmt_LIBRARY_DIRS} ${CONAN_LIB_DIRS_fmt} |
|||
) |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(fmt |
|||
FOUND_VAR fmt_FOUND |
|||
REQUIRED_VARS |
|||
fmt_LIBRARY |
|||
fmt_INCLUDE_DIR |
|||
VERSION_VAR fmt_VERSION |
|||
) |
|||
|
|||
if(fmt_FOUND) |
|||
set(fmt_LIBRARIES ${fmt_LIBRARY}) |
|||
set(fmt_INCLUDE_DIRS ${fmt_INCLUDE_DIR}) |
|||
set(fmt_DEFINITIONS ${PC_fmt_CFLAGS_OTHER}) |
|||
endif() |
|||
|
|||
if(fmt_FOUND AND NOT TARGET fmt::fmt) |
|||
add_library(fmt::fmt UNKNOWN IMPORTED) |
|||
set_target_properties(fmt::fmt PROPERTIES |
|||
IMPORTED_LOCATION "${fmt_LIBRARY}" |
|||
INTERFACE_COMPILE_OPTIONS "${PC_fmt_CFLAGS_OTHER}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${fmt_INCLUDE_DIR}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
fmt_INCLUDE_DIR |
|||
fmt_LIBRARY |
|||
) |
|||
@ -0,0 +1,54 @@ |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PC_lz4 QUIET lz4) |
|||
|
|||
find_path(lz4_INCLUDE_DIR |
|||
NAMES lz4.h |
|||
PATHS ${PC_lz4_INCLUDE_DIRS} |
|||
) |
|||
find_library(lz4_LIBRARY |
|||
NAMES lz4 |
|||
PATHS ${PC_lz4_LIBRARY_DIRS} |
|||
) |
|||
|
|||
if(lz4_INCLUDE_DIR) |
|||
file(STRINGS "${lz4_INCLUDE_DIR}/lz4.h" _lz4_version_lines |
|||
REGEX "#define[ \t]+LZ4_VERSION_(MAJOR|MINOR|RELEASE)") |
|||
string(REGEX REPLACE ".*LZ4_VERSION_MAJOR *\([0-9]*\).*" "\\1" _lz4_version_major "${_lz4_version_lines}") |
|||
string(REGEX REPLACE ".*LZ4_VERSION_MINOR *\([0-9]*\).*" "\\1" _lz4_version_minor "${_lz4_version_lines}") |
|||
string(REGEX REPLACE ".*LZ4_VERSION_RELEASE *\([0-9]*\).*" "\\1" _lz4_version_release "${_lz4_version_lines}") |
|||
set(lz4_VERSION "${_lz4_version_major}.${_lz4_version_minor}.${_lz4_version_release}") |
|||
unset(_lz4_version_major) |
|||
unset(_lz4_version_minor) |
|||
unset(_lz4_version_release) |
|||
unset(_lz4_version_lines) |
|||
endif() |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(lz4 |
|||
FOUND_VAR lz4_FOUND |
|||
REQUIRED_VARS |
|||
lz4_LIBRARY |
|||
lz4_INCLUDE_DIR |
|||
VERSION_VAR lz4_VERSION |
|||
) |
|||
|
|||
if(lz4_FOUND) |
|||
set(lz4_LIBRARIES ${lz4_LIBRARY}) |
|||
set(lz4_INCLUDE_DIRS ${lz4_INCLUDE_DIR}) |
|||
set(lz4_DEFINITIONS ${PC_lz4_CFLAGS_OTHER}) |
|||
endif() |
|||
|
|||
if(lz4_FOUND AND NOT TARGET lz4::lz4) |
|||
add_library(lz4::lz4 UNKNOWN IMPORTED) |
|||
set_target_properties(lz4::lz4 PROPERTIES |
|||
IMPORTED_LOCATION "${lz4_LIBRARY}" |
|||
INTERFACE_COMPILE_OPTIONS "${PC_lz4_CFLAGS_OTHER}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${lz4_INCLUDE_DIR}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
lz4_INCLUDE_DIR |
|||
lz4_LIBRARY |
|||
) |
|||
@ -0,0 +1,35 @@ |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PC_nlohmann_json QUIET nlohmann_json) |
|||
|
|||
find_path(nlohmann_json_INCLUDE_DIR |
|||
NAMES json.hpp |
|||
PATHS ${PC_nlohmann_json_INCLUDE_DIRS} |
|||
PATH_SUFFIXES nlohmann |
|||
) |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(nlohmann_json |
|||
FOUND_VAR nlohmann_json_FOUND |
|||
REQUIRED_VARS |
|||
nlohmann_json_INCLUDE_DIR |
|||
VERSION_VAR nlohmann_json_VERSION |
|||
) |
|||
|
|||
if(nlohmann_json_FOUND) |
|||
set(nlohmann_json_INCLUDE_DIRS ${nlohmann_json_INCLUDE_DIR}) |
|||
set(nlohmann_json_DEFINITIONS ${PC_nlohmann_json_CFLAGS_OTHER}) |
|||
endif() |
|||
|
|||
if(nlohmann_json_FOUND AND NOT TARGET nlohmann_json::nlohmann_json) |
|||
add_library(nlohmann_json::nlohmann_json UNKNOWN IMPORTED) |
|||
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES |
|||
IMPORTED_LOCATION "${nlohmann_json_LIBRARY}" |
|||
INTERFACE_COMPILE_OPTIONS "${PC_nlohmann_json_CFLAGS_OTHER}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${nlohmann_json_INCLUDE_DIR}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
nlohmann_json_INCLUDE_DIR |
|||
) |
|||
@ -0,0 +1,42 @@ |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PC_opus QUIET opus) |
|||
|
|||
find_path(opus_INCLUDE_DIR |
|||
NAMES opus.h |
|||
PATHS ${PC_opus_INCLUDE_DIRS} |
|||
PATH_SUFFIXES opus |
|||
) |
|||
find_library(opus_LIBRARY |
|||
NAMES opus |
|||
PATHS ${PC_opus_LIBRARY_DIRS} |
|||
) |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(opus |
|||
FOUND_VAR opus_FOUND |
|||
REQUIRED_VARS |
|||
opus_LIBRARY |
|||
opus_INCLUDE_DIR |
|||
VERSION_VAR opus_VERSION |
|||
) |
|||
|
|||
if(opus_FOUND) |
|||
set(Opus_LIBRARIES ${opus_LIBRARY}) |
|||
set(Opus_INCLUDE_DIRS ${opus_INCLUDE_DIR}) |
|||
set(Opus_DEFINITIONS ${PC_opus_CFLAGS_OTHER}) |
|||
endif() |
|||
|
|||
if(opus_FOUND AND NOT TARGET Opus::Opus) |
|||
add_library(Opus::Opus UNKNOWN IMPORTED) |
|||
set_target_properties(Opus::Opus PROPERTIES |
|||
IMPORTED_LOCATION "${opus_LIBRARY}" |
|||
INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${opus_INCLUDE_DIR}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
opus_INCLUDE_DIR |
|||
opus_LIBRARY |
|||
) |
|||
@ -0,0 +1,41 @@ |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PC_zstd QUIET libzstd) |
|||
|
|||
find_path(zstd_INCLUDE_DIR |
|||
NAMES zstd.h |
|||
PATHS ${PC_zstd_INCLUDE_DIRS} |
|||
) |
|||
find_library(zstd_LIBRARY |
|||
NAMES zstd |
|||
PATHS ${PC_zstd_LIBRARY_DIRS} |
|||
) |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(zstd |
|||
FOUND_VAR zstd_FOUND |
|||
REQUIRED_VARS |
|||
zstd_LIBRARY |
|||
zstd_INCLUDE_DIR |
|||
VERSION_VAR zstd_VERSION |
|||
) |
|||
|
|||
if(zstd_FOUND) |
|||
set(zstd_LIBRARIES ${zstd_LIBRARY}) |
|||
set(zstd_INCLUDE_DIRS ${zstd_INCLUDE_DIR}) |
|||
set(zstd_DEFINITIONS ${PC_zstd_CFLAGS_OTHER}) |
|||
endif() |
|||
|
|||
if(zstd_FOUND AND NOT TARGET zstd::zstd) |
|||
add_library(zstd::zstd UNKNOWN IMPORTED) |
|||
set_target_properties(zstd::zstd PROPERTIES |
|||
IMPORTED_LOCATION "${zstd_LIBRARY}" |
|||
INTERFACE_COMPILE_OPTIONS "${PC_zstd_CFLAGS_OTHER}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${zstd_INCLUDE_DIR}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
zstd_INCLUDE_DIR |
|||
zstd_LIBRARY |
|||
) |
|||
@ -1,9 +0,0 @@ |
|||
JSON for Modern C++ |
|||
=================== |
|||
|
|||
v3.1.2 |
|||
|
|||
This is a mirror providing the single required header file. |
|||
|
|||
The original repository can be found at: |
|||
https://github.com/nlohmann/json/commit/d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe |
|||
17300
externals/json/json.hpp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,254 +0,0 @@ |
|||
cmake_minimum_required(VERSION 3.8) |
|||
|
|||
project(opus) |
|||
|
|||
option(OPUS_STACK_PROTECTOR "Use stack protection" OFF) |
|||
option(OPUS_USE_ALLOCA "Use alloca for stack arrays (on non-C99 compilers)" OFF) |
|||
option(OPUS_CUSTOM_MODES "Enable non-Opus modes, e.g. 44.1 kHz & 2^n frames" OFF) |
|||
option(OPUS_FIXED_POINT "Compile as fixed-point (for machines without a fast enough FPU)" OFF) |
|||
option(OPUS_ENABLE_FLOAT_API "Compile with the floating point API (for machines with float library" ON) |
|||
|
|||
include(opus/opus_functions.cmake) |
|||
|
|||
if(OPUS_STACK_PROTECTOR) |
|||
if(NOT MSVC) # GC on by default on MSVC |
|||
check_and_set_flag(STACK_PROTECTION_STRONG -fstack-protector-strong) |
|||
endif() |
|||
else() |
|||
if(MSVC) |
|||
check_and_set_flag(BUFFER_SECURITY_CHECK /GS-) |
|||
endif() |
|||
endif() |
|||
|
|||
add_library(opus STATIC |
|||
# CELT sources |
|||
opus/celt/bands.c |
|||
opus/celt/celt.c |
|||
opus/celt/celt_decoder.c |
|||
opus/celt/celt_encoder.c |
|||
opus/celt/celt_lpc.c |
|||
opus/celt/cwrs.c |
|||
opus/celt/entcode.c |
|||
opus/celt/entdec.c |
|||
opus/celt/entenc.c |
|||
opus/celt/kiss_fft.c |
|||
opus/celt/laplace.c |
|||
opus/celt/mathops.c |
|||
opus/celt/mdct.c |
|||
opus/celt/modes.c |
|||
opus/celt/pitch.c |
|||
opus/celt/quant_bands.c |
|||
opus/celt/rate.c |
|||
opus/celt/vq.c |
|||
|
|||
# SILK sources |
|||
opus/silk/A2NLSF.c |
|||
opus/silk/CNG.c |
|||
opus/silk/HP_variable_cutoff.c |
|||
opus/silk/LPC_analysis_filter.c |
|||
opus/silk/LPC_fit.c |
|||
opus/silk/LPC_inv_pred_gain.c |
|||
opus/silk/LP_variable_cutoff.c |
|||
opus/silk/NLSF2A.c |
|||
opus/silk/NLSF_VQ.c |
|||
opus/silk/NLSF_VQ_weights_laroia.c |
|||
opus/silk/NLSF_decode.c |
|||
opus/silk/NLSF_del_dec_quant.c |
|||
opus/silk/NLSF_encode.c |
|||
opus/silk/NLSF_stabilize.c |
|||
opus/silk/NLSF_unpack.c |
|||
opus/silk/NSQ.c |
|||
opus/silk/NSQ_del_dec.c |
|||
opus/silk/PLC.c |
|||
opus/silk/VAD.c |
|||
opus/silk/VQ_WMat_EC.c |
|||
opus/silk/ana_filt_bank_1.c |
|||
opus/silk/biquad_alt.c |
|||
opus/silk/bwexpander.c |
|||
opus/silk/bwexpander_32.c |
|||
opus/silk/check_control_input.c |
|||
opus/silk/code_signs.c |
|||
opus/silk/control_SNR.c |
|||
opus/silk/control_audio_bandwidth.c |
|||
opus/silk/control_codec.c |
|||
opus/silk/dec_API.c |
|||
opus/silk/decode_core.c |
|||
opus/silk/decode_frame.c |
|||
opus/silk/decode_indices.c |
|||
opus/silk/decode_parameters.c |
|||
opus/silk/decode_pitch.c |
|||
opus/silk/decode_pulses.c |
|||
opus/silk/decoder_set_fs.c |
|||
opus/silk/enc_API.c |
|||
opus/silk/encode_indices.c |
|||
opus/silk/encode_pulses.c |
|||
opus/silk/gain_quant.c |
|||
opus/silk/init_decoder.c |
|||
opus/silk/init_encoder.c |
|||
opus/silk/inner_prod_aligned.c |
|||
opus/silk/interpolate.c |
|||
opus/silk/lin2log.c |
|||
opus/silk/log2lin.c |
|||
opus/silk/pitch_est_tables.c |
|||
opus/silk/process_NLSFs.c |
|||
opus/silk/quant_LTP_gains.c |
|||
opus/silk/resampler.c |
|||
opus/silk/resampler_down2.c |
|||
opus/silk/resampler_down2_3.c |
|||
opus/silk/resampler_private_AR2.c |
|||
opus/silk/resampler_private_IIR_FIR.c |
|||
opus/silk/resampler_private_down_FIR.c |
|||
opus/silk/resampler_private_up2_HQ.c |
|||
opus/silk/resampler_rom.c |
|||
opus/silk/shell_coder.c |
|||
opus/silk/sigm_Q15.c |
|||
opus/silk/sort.c |
|||
opus/silk/stereo_LR_to_MS.c |
|||
opus/silk/stereo_MS_to_LR.c |
|||
opus/silk/stereo_decode_pred.c |
|||
opus/silk/stereo_encode_pred.c |
|||
opus/silk/stereo_find_predictor.c |
|||
opus/silk/stereo_quant_pred.c |
|||
opus/silk/sum_sqr_shift.c |
|||
opus/silk/table_LSF_cos.c |
|||
opus/silk/tables_LTP.c |
|||
opus/silk/tables_NLSF_CB_NB_MB.c |
|||
opus/silk/tables_NLSF_CB_WB.c |
|||
opus/silk/tables_gain.c |
|||
opus/silk/tables_other.c |
|||
opus/silk/tables_pitch_lag.c |
|||
opus/silk/tables_pulses_per_block.c |
|||
|
|||
# Opus sources |
|||
opus/src/analysis.c |
|||
opus/src/mapping_matrix.c |
|||
opus/src/mlp.c |
|||
opus/src/mlp_data.c |
|||
opus/src/opus.c |
|||
opus/src/opus_decoder.c |
|||
opus/src/opus_encoder.c |
|||
opus/src/opus_multistream.c |
|||
opus/src/opus_multistream_decoder.c |
|||
opus/src/opus_multistream_encoder.c |
|||
opus/src/opus_projection_decoder.c |
|||
opus/src/opus_projection_encoder.c |
|||
opus/src/repacketizer.c |
|||
) |
|||
|
|||
if (DEBUG) |
|||
target_sources(opus PRIVATE opus/silk/debug.c) |
|||
endif() |
|||
|
|||
if (OPUS_FIXED_POINT) |
|||
target_sources(opus PRIVATE |
|||
opus/silk/fixed/LTP_analysis_filter_FIX.c |
|||
opus/silk/fixed/LTP_scale_ctrl_FIX.c |
|||
opus/silk/fixed/apply_sine_window_FIX.c |
|||
opus/silk/fixed/autocorr_FIX.c |
|||
opus/silk/fixed/burg_modified_FIX.c |
|||
opus/silk/fixed/corrMatrix_FIX.c |
|||
opus/silk/fixed/encode_frame_FIX.c |
|||
opus/silk/fixed/find_LPC_FIX.c |
|||
opus/silk/fixed/find_LTP_FIX.c |
|||
opus/silk/fixed/find_pitch_lags_FIX.c |
|||
opus/silk/fixed/find_pred_coefs_FIX.c |
|||
opus/silk/fixed/k2a_FIX.c |
|||
opus/silk/fixed/k2a_Q16_FIX.c |
|||
opus/silk/fixed/noise_shape_analysis_FIX.c |
|||
opus/silk/fixed/pitch_analysis_core_FIX.c |
|||
opus/silk/fixed/prefilter_FIX.c |
|||
opus/silk/fixed/process_gains_FIX.c |
|||
opus/silk/fixed/regularize_correlations_FIX.c |
|||
opus/silk/fixed/residual_energy16_FIX.c |
|||
opus/silk/fixed/residual_energy_FIX.c |
|||
opus/silk/fixed/schur64_FIX.c |
|||
opus/silk/fixed/schur_FIX.c |
|||
opus/silk/fixed/solve_LS_FIX.c |
|||
opus/silk/fixed/vector_ops_FIX.c |
|||
opus/silk/fixed/warped_autocorrelation_FIX.c |
|||
) |
|||
else() |
|||
target_sources(opus PRIVATE |
|||
opus/silk/float/LPC_analysis_filter_FLP.c |
|||
opus/silk/float/LPC_inv_pred_gain_FLP.c |
|||
opus/silk/float/LTP_analysis_filter_FLP.c |
|||
opus/silk/float/LTP_scale_ctrl_FLP.c |
|||
opus/silk/float/apply_sine_window_FLP.c |
|||
opus/silk/float/autocorrelation_FLP.c |
|||
opus/silk/float/burg_modified_FLP.c |
|||
opus/silk/float/bwexpander_FLP.c |
|||
opus/silk/float/corrMatrix_FLP.c |
|||
opus/silk/float/encode_frame_FLP.c |
|||
opus/silk/float/energy_FLP.c |
|||
opus/silk/float/find_LPC_FLP.c |
|||
opus/silk/float/find_LTP_FLP.c |
|||
opus/silk/float/find_pitch_lags_FLP.c |
|||
opus/silk/float/find_pred_coefs_FLP.c |
|||
opus/silk/float/inner_product_FLP.c |
|||
opus/silk/float/k2a_FLP.c |
|||
opus/silk/float/noise_shape_analysis_FLP.c |
|||
opus/silk/float/pitch_analysis_core_FLP.c |
|||
opus/silk/float/process_gains_FLP.c |
|||
opus/silk/float/regularize_correlations_FLP.c |
|||
opus/silk/float/residual_energy_FLP.c |
|||
opus/silk/float/scale_copy_vector_FLP.c |
|||
opus/silk/float/scale_vector_FLP.c |
|||
opus/silk/float/schur_FLP.c |
|||
opus/silk/float/sort_FLP.c |
|||
opus/silk/float/warped_autocorrelation_FLP.c |
|||
opus/silk/float/wrappers_FLP.c |
|||
) |
|||
endif() |
|||
|
|||
target_compile_definitions(opus PRIVATE OPUS_BUILD ENABLE_HARDENING) |
|||
|
|||
if(NOT MSVC) |
|||
if(MINGW) |
|||
target_compile_definitions(opus PRIVATE _FORTIFY_SOURCE=0) |
|||
else() |
|||
target_compile_definitions(opus PRIVATE _FORTIFY_SOURCE=2) |
|||
endif() |
|||
endif() |
|||
|
|||
# It is strongly recommended to uncomment one of these VAR_ARRAYS: Use C99 |
|||
# variable-length arrays for stack allocation USE_ALLOCA: Use alloca() for stack |
|||
# allocation If none is defined, then the fallback is a non-threadsafe global |
|||
# array |
|||
if(OPUS_USE_ALLOCA OR MSVC) |
|||
target_compile_definitions(opus PRIVATE USE_ALLOCA) |
|||
else() |
|||
target_compile_definitions(opus PRIVATE VAR_ARRAYS) |
|||
endif() |
|||
|
|||
if(OPUS_CUSTOM_MODES) |
|||
target_compile_definitions(opus PRIVATE CUSTOM_MODES) |
|||
endif() |
|||
|
|||
if(NOT OPUS_ENABLE_FLOAT_API) |
|||
target_compile_definitions(opus PRIVATE DISABLE_FLOAT_API) |
|||
endif() |
|||
|
|||
target_compile_definitions(opus |
|||
PUBLIC |
|||
-DOPUS_VERSION="\\"1.3.1\\"" |
|||
|
|||
PRIVATE |
|||
# Use C99 intrinsics to speed up float-to-int conversion |
|||
HAVE_LRINTF |
|||
) |
|||
|
|||
if (FIXED_POINT) |
|||
target_compile_definitions(opus PRIVATE -DFIXED_POINT=1 -DDISABLE_FLOAT_API) |
|||
endif() |
|||
|
|||
target_include_directories(opus |
|||
PUBLIC |
|||
opus/include |
|||
|
|||
PRIVATE |
|||
opus/celt |
|||
opus/silk |
|||
opus/silk/fixed |
|||
opus/silk/float |
|||
opus/src |
|||
) |
|||
@ -1,81 +0,0 @@ |
|||
project(zlib C) |
|||
|
|||
include(CheckTypeSize) |
|||
include(CheckFunctionExists) |
|||
include(CheckIncludeFile) |
|||
|
|||
check_include_file(sys/types.h HAVE_SYS_TYPES_H) |
|||
check_include_file(stdint.h HAVE_STDINT_H) |
|||
check_include_file(stddef.h HAVE_STDDEF_H) |
|||
|
|||
# Check to see if we have large file support |
|||
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) |
|||
# We add these other definitions here because CheckTypeSize.cmake |
|||
# in CMake 2.4.x does not automatically do so and we want |
|||
# compatibility with CMake 2.4.x. |
|||
if(HAVE_SYS_TYPES_H) |
|||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) |
|||
endif() |
|||
if(HAVE_STDINT_H) |
|||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) |
|||
endif() |
|||
if(HAVE_STDDEF_H) |
|||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) |
|||
endif() |
|||
check_type_size(off64_t OFF64_T) |
|||
if(HAVE_OFF64_T) |
|||
add_definitions(-D_LARGEFILE64_SOURCE=1) |
|||
endif() |
|||
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable |
|||
|
|||
# Check for fseeko |
|||
check_function_exists(fseeko HAVE_FSEEKO) |
|||
if(NOT HAVE_FSEEKO) |
|||
add_definitions(-DNO_FSEEKO) |
|||
endif() |
|||
|
|||
# Check for unistd.h |
|||
check_include_file(unistd.h HAVE_UNISTD_H) |
|||
if(HAVE_UNISTD_H) |
|||
add_definitions(-DHAVE_UNISTD_H) |
|||
endif() |
|||
|
|||
if(MSVC) |
|||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE) |
|||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) |
|||
endif() |
|||
|
|||
add_library(z STATIC |
|||
zlib/adler32.c |
|||
zlib/compress.c |
|||
zlib/crc32.c |
|||
zlib/crc32.h |
|||
zlib/deflate.c |
|||
zlib/deflate.h |
|||
zlib/gzclose.c |
|||
zlib/gzguts.h |
|||
zlib/gzlib.c |
|||
zlib/gzread.c |
|||
zlib/gzwrite.c |
|||
zlib/inffast.h |
|||
zlib/inffixed.h |
|||
zlib/inflate.c |
|||
zlib/inflate.h |
|||
zlib/infback.c |
|||
zlib/inftrees.c |
|||
zlib/inftrees.h |
|||
zlib/inffast.c |
|||
zlib/trees.c |
|||
zlib/trees.h |
|||
zlib/uncompr.c |
|||
zlib/zconf.h |
|||
zlib/zlib.h |
|||
zlib/zutil.c |
|||
zlib/zutil.h |
|||
) |
|||
add_library(ZLIB::ZLIB ALIAS z) |
|||
|
|||
target_include_directories(z |
|||
PUBLIC |
|||
zlib/ |
|||
) |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue