Merge pull request #1034 from jbhelm/taglib_from_github

[taglib] Support for installing from HEAD
This commit is contained in:
Alexander Karatarakis 2017-05-08 11:56:15 -07:00 committed by GitHub
commit f9dffe647b
2 changed files with 18 additions and 29 deletions

View File

@ -1,16 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a59efc9..8ac3266 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,6 +64,11 @@ if(MSVC AND ENABLE_STATIC_RUNTIME)
endforeach(flag_var)
endif()
+# disable error on usage of vsprintf() for UWP builds
+if(MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")
+endif()
+
# Read version information from file taglib/toolkit/taglib.h into variables
# TAGLIB_LIB_MAJOR_VERSION, TAGLIB_LIB_MINOR_VERSION, TAGLIB_LIB_PATCH_VERSION.
foreach(version_part MAJOR MINOR PATCH)

View File

@ -1,24 +1,29 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/taglib-1.11.1)
vcpkg_download_distfile(ARCHIVE
URLS "http://taglib.org/releases/taglib-1.11.1.tar.gz"
FILENAME "taglib-1.11.1.tar.gz"
SHA512 7846775c4954ea948fe4383e514ba7c11f55d038ee06b6ea5a0a1c1069044b348026e76b27aa4ba1c71539aa8143e1401fab39184cc6e915ba0ae2c06133cb98
)
vcpkg_extract_source_archive(${ARCHIVE})
#patches for UWP
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/ignore_c4996_error.patch
${CMAKE_CURRENT_LIST_DIR}/replace_non-uwp_functions.patch
${CMAKE_CURRENT_LIST_DIR}/dont-assume-latin-1.patch
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO taglib/taglib
REF v1.11.1
SHA512 7846775c4954ea948fe4383e514ba7c11f55d038ee06b6ea5a0a1c1069044b348026e76b27aa4ba1c71539aa8143e1401fab39184cc6e915ba0ae2c06133cb98
HEAD_REF master
)
if(NOT VCPKG_USE_HEAD_VERSION) # these have been fixed upstream after 1.11.1
# patches for UWP
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/replace_non-uwp_functions.patch
${CMAKE_CURRENT_LIST_DIR}/dont-assume-latin-1.patch
)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DHAVE_VSNPRINTF=1 # taglib/ConfigureChecks.cmake doesn't properly detect MSVC vsnprintf() on UWP
)
vcpkg_install_cmake()