[libvpx] Change default target on Unix (#11500)

* [libvpx] Change default target on Unix

* Update CONTROL

* [libvpx] Support to build x86/x64 on Unix

* [libvpx] Update by review comments

* Update portfile.cmake

* [libvpx] By default build with 'generic-gnu'
This commit is contained in:
Vitaly Petrov 2020-05-27 00:05:44 +03:00 committed by GitHub
parent b271aeffa2
commit b37f5d651d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View File

@ -1,5 +1,5 @@
Source: libvpx
Version: 1.8.1-3
Version: 1.8.1-4
Homepage: https://github.com/webmproject/libvpx
Description: The reference software implementation for the video coding formats VP8 and VP9.
Supports: !(uwp|arm|arm64)

View File

@ -128,8 +128,24 @@ else()
else()
set(OPTIONS "${OPTIONS} --enable-static --disable-shared")
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
set(LIBVPX_TARGET_ARCH "x86")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(LIBVPX_TARGET_ARCH "x86_64")
else()
message(FATAL_ERROR "libvpx does not support architecture ${VCPKG_TARGET_ARCHITECTURE}")
endif()
message(STATUS "Building Options: ${OPTIONS}")
if(VCPKG_TARGET_IS_LINUX)
set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-linux-gcc")
elseif(VCPKG_TARGET_IS_OSX)
set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-darwin17-gcc") # enable latest CPU instructions for best performance and less CPU usage on MacOS
else()
set(LIBVPX_TARGET "generic-gnu") # use default target
endif()
message(STATUS "Build info. Target: ${LIBVPX_TARGET}; Options: ${OPTIONS}")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
message(STATUS "Configuring libvpx for Release")
@ -138,6 +154,7 @@ else()
COMMAND
${BASH} --noprofile --norc
"${SOURCE_PATH}/configure"
--target=${LIBVPX_TARGET}
${OPTIONS}
${OPTIONS_RELEASE}
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
@ -169,6 +186,7 @@ else()
COMMAND
${BASH} --noprofile --norc
"${SOURCE_PATH}/configure"
--target=${LIBVPX_TARGET}
${OPTIONS}
${OPTIONS_DEBUG}
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"