2
0

xmake.lua 1015 B

1234567891011121314151617181920212223242526272829
  1. package("x265")
  2. set_homepage("http://x265.org")
  3. set_description("A free software library and application for encoding video streams into the H.265/MPEG-H HEVC compression format.")
  4. add_urls("https://github.com/videolan/x265/archive/$(version).tar.gz",
  5. "https://github.com/videolan/x265.git")
  6. add_versions("3.4", "544d147bf146f8994a7bf8521ed878c93067ea1c7c6e93ab602389be3117eaaf")
  7. add_deps("cmake", "nasm")
  8. if is_plat("macosx") then
  9. add_syslinks("c++")
  10. elseif is_plat("linux") then
  11. add_syslinks("pthread", "dl")
  12. end
  13. on_install("linux", "macosx", function (package)
  14. os.cd("build/linux")
  15. os.vrun("./multilib.sh")
  16. os.cp("8bit/libx265.a", package:installdir("lib"))
  17. os.cp("8bit/x265_config.h", package:installdir("include"))
  18. os.cp("../../source/x265.h", package:installdir("include"))
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("x265_api_get", {includes = "x265.h"}))
  22. end)