[opus] Make AVX an optional feature (#10634)

This commit is contained in:
Gabriel 2020-04-03 19:17:41 +02:00 committed by GitHub
parent a4028d3ace
commit f4759a6ded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,7 @@
Source: opus
Version: 1.3.1
Version: 1.3.1-2
Homepage: https://github.com/xiph/opus
Description: Totally open, royalty-free, highly versatile audio codec
Feature: avx
Description: Builds the library with avx instruction set

View File

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH
SOURCE_PATH
@ -12,7 +10,14 @@ vcpkg_from_github(
HEAD_REF
master)
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
avx AVX_SUPPORTED
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${FEATURE_OPTIONS}
PREFER_NINJA)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Opus)
vcpkg_copy_pdbs()