2
0

xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. package("watcher")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/e-dant/watcher")
  4. set_description("Filesystem watcher. Works anywhere. Simple, efficient and friendly.")
  5. set_license("MIT")
  6. set_urls("https://github.com/e-dant/watcher/archive/refs/tags/release/$(version).tar.gz",
  7. "https://github.com/e-dant/watcher.git")
  8. add_versions("0.11.0", "dd92496d77b6bc27e27ed28253faae4d81bc58b19407d154bb49504b2af73664")
  9. add_versions("0.9.5", "41b74d138eec106c35a99e7544def599453a8bf4cf4887ad627e1c9e3355287c")
  10. if is_plat("linux", "bsd") then
  11. add_syslinks("pthread")
  12. elseif is_plat("macosx") then
  13. add_frameworks("CoreFoundation", "CoreServices")
  14. end
  15. on_install("windows", "linux", "macosx", "mingw", "msys", "android", "cross", function (package)
  16. os.cp("include", package:installdir())
  17. end)
  18. on_test(function (package)
  19. assert(package:check_cxxsnippets({test = [[
  20. #include <wtr/watcher.hpp>
  21. void test() {
  22. auto cb = [](wtr::event const& ev) {};
  23. auto watcher = wtr::watch(".", cb);
  24. }
  25. ]]}, {configs = {languages = "c++17"}}))
  26. end)