Add libsamplerate 0.2.2 (#2331)
* Add libsamplerate 0.2.2 * Update xmake.lua --------- Co-authored-by: ruki <waruqi@gmail.com>pull/2335/head
parent
81e48d23c5
commit
ed2b96f05b
1 changed files with 27 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||||||
|
package("libsamplerate") |
||||||
|
|
||||||
|
set_homepage("http://libsndfile.github.io/libsamplerate/") |
||||||
|
set_description("An audio Sample Rate Conversion library") |
||||||
|
set_license("BSD-2-Clause") |
||||||
|
|
||||||
|
add_urls("https://github.com/libsndfile/libsamplerate/archive/$(version).tar.gz", |
||||||
|
"https://github.com/libsndfile/libsamplerate.git") |
||||||
|
|
||||||
|
add_versions("0.2.2", "16e881487f184250deb4fcb60432d7556ab12cb58caea71ef23960aec6c0405a") |
||||||
|
|
||||||
|
add_deps("cmake") |
||||||
|
|
||||||
|
on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", function (package) |
||||||
|
local configs = {} |
||||||
|
table.insert(configs, "-DBUILD_PROGRAMS=OFF") |
||||||
|
table.insert(configs, "-DBUILD_EXAMPLES=OFF") |
||||||
|
table.insert(configs, "-DBUILD_TESTING=OFF") |
||||||
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||||
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||||
|
table.insert(configs, "-DLIBSAMPLERATE_EXAMPLES=OFF") |
||||||
|
import("package.tools.cmake").install(package, configs) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:has_cfuncs("src_simple", {includes = "samplerate.h"})) |
||||||
|
end) |
Loading…
Reference in new issue