Changeset View
Changeset View
Standalone View
Standalone View
files/tg_owt-Link-against-shared-libvpx.patch
- This file was added.
| From bce87f403147cb1efae8bb917557efb090a15742 Mon Sep 17 00:00:00 2001 | |||||
| From: Fabio Forni <livingsilver94.solus@redaril.me> | |||||
| Date: Thu, 24 Dec 2020 21:28:34 +0100 | |||||
| Subject: [PATCH] Link against shared libvpx | |||||
| --- | |||||
| CMakeLists.txt | 24 +----------------------- | |||||
| cmake/external.cmake | 9 +++++++++ | |||||
| 2 files changed, 10 insertions(+), 23 deletions(-) | |||||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | |||||
| index d970719..e4e5b4f 100644 | |||||
| --- a/CMakeLists.txt | |||||
| +++ b/CMakeLists.txt | |||||
| @@ -45,7 +45,6 @@ include(cmake/libpffft.cmake) | |||||
| include(cmake/librnnoise.cmake) | |||||
| include(cmake/libsrtp.cmake) | |||||
| include(cmake/libusrsctp.cmake) | |||||
| -include(cmake/libvpx.cmake) | |||||
| include(cmake/libwebrtcbuild.cmake) | |||||
| include(cmake/libyuv.cmake) | |||||
| if (NOT WIN32 AND NOT APPLE) | |||||
| @@ -77,13 +76,6 @@ if (is_x86 OR is_x64) | |||||
| tg_owt::librnnoise | |||||
| tg_owt::libsrtp | |||||
| tg_owt::libusrsctp | |||||
| - tg_owt::libvpx | |||||
| - tg_owt::libvpx_mmx | |||||
| - tg_owt::libvpx_sse2 | |||||
| - tg_owt::libvpx_ssse3 | |||||
| - tg_owt::libvpx_sse4 | |||||
| - tg_owt::libvpx_avx | |||||
| - tg_owt::libvpx_avx2 | |||||
| tg_owt::libyuv | |||||
| ) | |||||
| else() | |||||
| @@ -97,7 +89,6 @@ else() | |||||
| tg_owt::librnnoise | |||||
| tg_owt::libsrtp | |||||
| tg_owt::libusrsctp | |||||
| - tg_owt::libvpx | |||||
| tg_owt::libyuv | |||||
| ) | |||||
| endif() | |||||
| @@ -125,6 +116,7 @@ endif() | |||||
| link_openssl(tg_owt) | |||||
| link_ffmpeg(tg_owt) | |||||
| link_opus(tg_owt) | |||||
| +link_libvpx(tg_owt) | |||||
| if (UNIX AND NOT APPLE) | |||||
| link_libalsa(tg_owt) | |||||
| @@ -1867,18 +1859,6 @@ elseif (APPLE) | |||||
| ) | |||||
| endif() | |||||
| -set(vpx_export) | |||||
| -if (is_x86 OR is_x64) | |||||
| - set(vpx_export | |||||
| - libvpx_mmx | |||||
| - libvpx_sse2 | |||||
| - libvpx_ssse3 | |||||
| - libvpx_sse4 | |||||
| - libvpx_avx | |||||
| - libvpx_avx2 | |||||
| - ) | |||||
| -endif() | |||||
| - | |||||
| set(export_targets | |||||
| tg_owt | |||||
| libabsl | |||||
| @@ -1887,8 +1867,6 @@ set(export_targets | |||||
| librnnoise | |||||
| libsrtp | |||||
| libusrsctp | |||||
| - libvpx | |||||
| - ${vpx_export} | |||||
| libwebrtcbuild | |||||
| libyuv | |||||
| ${platform_export} | |||||
| diff --git a/cmake/external.cmake b/cmake/external.cmake | |||||
| index 964e260..ab7d46d 100644 | |||||
| --- a/cmake/external.cmake | |||||
| +++ b/cmake/external.cmake | |||||
| @@ -129,3 +129,12 @@ function(link_dl target_name) | |||||
| target_link_libraries(${target_name} PRIVATE ${CMAKE_DL_LIBS}) | |||||
| endif() | |||||
| endfunction() | |||||
| + | |||||
| +# libvpx | |||||
| +function(link_libvpx target_name) | |||||
| + if (TG_OWT_PACKAGED_BUILD) | |||||
| + find_package(PkgConfig REQUIRED) | |||||
| + pkg_check_modules(VPX REQUIRED vpx) | |||||
| + target_include_directories(${target_name} PRIVATE ${VPX_INCLUDE_DIRS}) | |||||
| + endif() | |||||
| +endfunction() | |||||
| -- | |||||
| 2.29.2 | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.