diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libsonic | |
Diffstat (limited to 'vcpkg/ports/libsonic')
| -rw-r--r-- | vcpkg/ports/libsonic/CMakeLists.txt | 34 | ||||
| -rw-r--r-- | vcpkg/ports/libsonic/portfile.cmake | 30 | ||||
| -rw-r--r-- | vcpkg/ports/libsonic/vcpkg.json | 19 |
3 files changed, 83 insertions, 0 deletions
diff --git a/vcpkg/ports/libsonic/CMakeLists.txt b/vcpkg/ports/libsonic/CMakeLists.txt new file mode 100644 index 0000000..d89ece2 --- /dev/null +++ b/vcpkg/ports/libsonic/CMakeLists.txt @@ -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() diff --git a/vcpkg/ports/libsonic/portfile.cmake b/vcpkg/ports/libsonic/portfile.cmake new file mode 100644 index 0000000..adacd0a --- /dev/null +++ b/vcpkg/ports/libsonic/portfile.cmake @@ -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") diff --git a/vcpkg/ports/libsonic/vcpkg.json b/vcpkg/ports/libsonic/vcpkg.json new file mode 100644 index 0000000..9b30096 --- /dev/null +++ b/vcpkg/ports/libsonic/vcpkg.json @@ -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" + } + } +} |