mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[libsonic] Add new port (#29374)
* [libsonic] Add new port * [libsonic] Update version * [libsonic] Fix porfiles * [libsonic] Update version * [libsonic] Add tool feature * [libsonic] Update version
This commit is contained in:
34
ports/libsonic/CMakeLists.txt
Normal file
34
ports/libsonic/CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(sonic
|
||||
VERSION 0.2.0
|
||||
LANGUAGES C
|
||||
)
|
||||
|
||||
option(BUILD_TOOL "Build sonic tool" ON)
|
||||
|
||||
add_library(libsonic sonic.c)
|
||||
set_target_properties(libsonic
|
||||
PROPERTIES
|
||||
PUBLIC_HEADER "${CMAKE_SOURCE_DIR}/sonic.h"
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||
VERSION ${CMAKE_PROJECT_VERSION}
|
||||
OUTPUT_NAME sonic
|
||||
)
|
||||
|
||||
install(TARGETS libsonic
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include
|
||||
)
|
||||
|
||||
if (BUILD_TOOL)
|
||||
add_executable(sonic wave.c main.c)
|
||||
target_link_libraries(sonic
|
||||
PRIVATE
|
||||
libsonic
|
||||
)
|
||||
|
||||
install(TARGETS sonic
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
endif()
|
||||
30
ports/libsonic/portfile.cmake
Normal file
30
ports/libsonic/portfile.cmake
Normal file
@@ -0,0 +1,30 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO waywardgeek/sonic
|
||||
REF "release-${VERSION}"
|
||||
SHA512 e70510c89c4f29c30f2a3443a1c4fc1aab2c99147e2ebd1dea3cbb2b89b8bdcee14dc504600ac1f04e82d32c19f17b06fbb417311853beb764c24d15687a126f
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tool BUILD_TOOL
|
||||
)
|
||||
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TOOL=${BUILD_TOOL}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
if(BUILD_TOOL)
|
||||
vcpkg_copy_tools(TOOL_NAMES sonic AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
19
ports/libsonic/vcpkg.json
Normal file
19
ports/libsonic/vcpkg.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "libsonic",
|
||||
"version": "0.2.0",
|
||||
"description": "Simple library to speed up or slow down speech",
|
||||
"homepage": "https://github.com/waywardgeek/sonic",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "linux | osx",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"tool": {
|
||||
"description": "Build tool"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4512,6 +4512,10 @@
|
||||
"baseline": "1.0.18",
|
||||
"port-version": 8
|
||||
},
|
||||
"libsonic": {
|
||||
"baseline": "0.2.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libsoundio": {
|
||||
"baseline": "2.0.0",
|
||||
"port-version": 7
|
||||
|
||||
9
versions/l-/libsonic.json
Normal file
9
versions/l-/libsonic.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b81fb841c7bcf7ce50cedfbdec8ff83b627a2d7a",
|
||||
"version": "0.2.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user