xmake.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. option("plugin", {default = false})
  2. add_requires("xxhash", "libp2p", "ffmpeg")
  3. if has_config("plugin") then
  4. add_requires("avisynthplus", "vapoursynth")
  5. end
  6. add_rules("mode.release", "mode.debug")
  7. set_languages("c++17")
  8. target("bestsource")
  9. set_kind("$(kind)")
  10. add_files(
  11. "src/audiosource.cpp",
  12. "src/bsshared.cpp",
  13. "src/tracklist.cpp",
  14. "src/videosource.cpp"
  15. )
  16. add_headerfiles(
  17. "src/audiosource.h",
  18. "src/bsshared.h",
  19. "src/tracklist.h",
  20. "src/version.h",
  21. "src/videosource.h"
  22. )
  23. if has_config("plugin") then
  24. add_files(
  25. "src/avisynth.cpp",
  26. "src/synthshared.cpp",
  27. "src/vapoursynth.cpp"
  28. )
  29. add_packages("avisynthplus", "vapoursynth")
  30. end
  31. if is_plat("windows") and is_kind("shared") then
  32. add_rules("utils.symbols.export_all", {export_classes = true})
  33. end
  34. if is_plat("windows", "mingw") then
  35. add_syslinks("shell32")
  36. end
  37. add_packages("xxhash", "libp2p", "ffmpeg")