diff options
| author | Vitaly Petrov <v31337@gmail.com> | 2020-05-27 00:05:44 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-26 14:05:44 -0700 |
| commit | b37f5d651d0f55a3f0ed709ed1682a4385294519 (patch) | |
| tree | 7bfca7b2c64ed8c6fc1c5aa4b65b7278e1df6310 | |
| parent | b271aeffa25c53f3750f58ad6209f3fa7c528716 (diff) | |
| download | vcpkg-b37f5d651d0f55a3f0ed709ed1682a4385294519.tar.gz vcpkg-b37f5d651d0f55a3f0ed709ed1682a4385294519.zip | |
[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'
| -rw-r--r-- | ports/libvpx/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libvpx/portfile.cmake | 20 |
2 files changed, 20 insertions, 2 deletions
diff --git a/ports/libvpx/CONTROL b/ports/libvpx/CONTROL index a7c918b06..b576588a3 100644 --- a/ports/libvpx/CONTROL +++ b/ports/libvpx/CONTROL @@ -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)
diff --git a/ports/libvpx/portfile.cmake b/ports/libvpx/portfile.cmake index a4be9fd1b..1e3d885fc 100644 --- a/ports/libvpx/portfile.cmake +++ b/ports/libvpx/portfile.cmake @@ -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() + + 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 "Building Options: ${OPTIONS}") + 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" |
