[opus] Fix version "unknown" returned by version API (#5134)

Related issues:

* erikd/libsndfile#406
* xiph/opus#110
* xiph/opus#111
This commit is contained in:
evpobr 2019-02-28 01:02:09 +05:00 committed by Phil Christensen
parent 2dfa568d18
commit 47950cabae
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,3 @@
Source: opus
Version: 1.3
Version: 1.3-1
Description: Totally open, royalty-free, highly versatile audio codec

View File

@ -0,0 +1 @@
PACKAGE_VERSION="@OPUS_VERSION@"

View File

@ -3,6 +3,9 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
endif()
include(vcpkg_common_functions)
set(OPUS_VERSION "1.3")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO xiph/opus
@ -12,6 +15,11 @@ vcpkg_from_github(
PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-main.patch"
)
configure_file(
${CMAKE_CURRENT_LIST_DIR}/package_version.in
${SOURCE_PATH}/package_version
)
# Ensure proper crt linkage
file(READ ${SOURCE_PATH}/win32/VS2015/common.props OPUS_PROPS)
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)