mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[soundtouch] update to 2.3.1 (#20017)
I worked with upstream to implement a CMake build system, so I removed the CMakeLists.txt from this port. This fixes multiple issues: * Headers were not installed by the port before. * The port did not allow dynamic linking before. * pkgconfig and CMake config files were not installed before.
This commit is contained in:
parent
827a54c404
commit
33fb841fba
@ -1,35 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(soundtouch CXX)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(ARCH_SUFFIX _x64)
|
||||
else()
|
||||
set(ARCH_SUFFIX)
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(TYPE_SUFFIX Dll)
|
||||
else()
|
||||
set(TYPE_SUFFIX $<$<Config:Debug>:D>)
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/include/soundtouch_config.h.in" ${CMAKE_CURRENT_BINARY_DIR}/include/soundtouch_config.h)
|
||||
|
||||
file(GLOB SOUNDTOUCH_SOURCES "${CMAKE_CURRENT_LIST_DIR}/source/SoundTouch/*.cpp")
|
||||
add_library(libsoundtouch ${SOUNDTOUCH_SOURCES})
|
||||
target_include_directories(libsoundtouch PUBLIC "${CMAKE_CURRENT_LIST_DIR}/include")
|
||||
target_include_directories(libsoundtouch PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||
set_target_properties(libsoundtouch PROPERTIES OUTPUT_NAME SoundTouch${TYPE_SUFFIX}${ARCH_SUFFIX})
|
||||
if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(libsoundtouch PRIVATE -DDLL_EXPORTS)
|
||||
target_sources(libsoundtouch PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/source/SoundTouchDLL/SoundTouchDLL.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/source/SoundTouchDLL/SoundTouchDLL.rc"
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS libsoundtouch
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
@ -1,31 +1,37 @@
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
||||
vcpkg_fail_port_install(ON_TARGET "UWP")
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "WindowsStore not supported")
|
||||
vcpkg_from_gitlab(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
GITLAB_URL https://gitlab.com
|
||||
REPO soundtouch/soundtouch
|
||||
REF 2.3.1
|
||||
SHA512 1eea5c06dc5af633b5c16902c6a951593190daf75bd6aa12e00c745080f9363e9c45ab52ddc434bd905e4195b306cc38c9143e813430c15c19a275ae1a82df24
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
soundstretch SOUNDSTRETCH
|
||||
soundtouchdll SOUNDTOUCH_DLL
|
||||
)
|
||||
|
||||
if(SOUNDTOUCH_DLL)
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
set(VERSION 2.0.0)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.surina.net/soundtouch/soundtouch-${VERSION}.zip"
|
||||
FILENAME "soundtouch-${VERSION}.zip"
|
||||
SHA512 50ef36b6cd21c16e235b908c5518e29b159b11f658a014c47fe767d3d8acebaefefec0ce253b4ed322cbd26387c69c0ed464ddace0c098e61d56d55c198117a5
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SoundTouch)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
if(SOUNDSTRETCH)
|
||||
vcpkg_copy_tools(TOOL_NAMES soundstretch AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "soundtouch",
|
||||
"version-string": "2.0.0",
|
||||
"port-version": 7,
|
||||
"version": "2.3.1",
|
||||
"description": "SoundTouch is an open-source audio processing library for changing the Tempo, Pitch and Playback Rates of audio streams or audio files.",
|
||||
"homepage": "https://www.surina.net/soundtouch",
|
||||
"supports": "!uwp",
|
||||
@ -9,6 +8,22 @@
|
||||
{
|
||||
"name": "atlmfc",
|
||||
"platform": "windows"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"soundstretch": {
|
||||
"description": "Build the soundstretch command line tool"
|
||||
},
|
||||
"soundtouchdll": {
|
||||
"description": "Build the SoundTouchDLL C wrapper dynamic library"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6201,8 +6201,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"soundtouch": {
|
||||
"baseline": "2.0.0",
|
||||
"port-version": 7
|
||||
"baseline": "2.3.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"soxr": {
|
||||
"baseline": "0.1.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8b6b644eb3ae55d7e56413e9cd88ca5ccc814c33",
|
||||
"version": "2.3.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "47269f38d27248c1e52fd21c3a296d032e02ac01",
|
||||
"version-string": "2.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user