xmake.lua 1.1 KB

1234567891011121314151617181920212223
  1. package("libebur128")
  2. set_homepage("https://github.com/jiixyj/libebur128")
  3. set_description("A library implementing the EBU R128 loudness standard.")
  4. set_license("MIT")
  5. add_urls("https://github.com/jiixyj/libebur128/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/jiixyj/libebur128.git")
  7. add_versions("v1.2.6", "baa7fc293a3d4651e244d8022ad03ab797ca3c2ad8442c43199afe8059faa613")
  8. add_deps("cmake")
  9. on_install(function (package)
  10. io.replace("ebur128/ebur128.c", [[#warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)"]], "", {plain = true})
  11. local configs = {"-DCMAKE_POLICY_DEFAULT_CMP0057=NEW"}
  12. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
  13. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  14. import("package.tools.cmake").install(package, configs)
  15. end)
  16. on_test(function (package)
  17. assert(package:has_cfuncs("ebur128_init", {includes = "ebur128.h"}))
  18. end)