xmake.lua 1.1 KB

123456789101112131415161718192021222324252627282930
  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.9.5", "41b74d138eec106c35a99e7544def599453a8bf4cf4887ad627e1c9e3355287c")
  9. if is_plat("linux", "bsd") then
  10. add_syslinks("pthread")
  11. elseif is_plat("macosx") then
  12. add_frameworks("CoreFoundation", "CoreServices")
  13. end
  14. on_install("windows", "linux", "macosx", "mingw", "msys", "android", "cross", function (package)
  15. os.cp("include", package:installdir())
  16. end)
  17. on_test(function (package)
  18. assert(package:check_cxxsnippets({test = [[
  19. #include <wtr/watcher.hpp>
  20. void test() {
  21. auto cb = [](wtr::event const& ev) {};
  22. auto watcher = wtr::watch(".", cb);
  23. }
  24. ]]}, {configs = {languages = "c++17"}}))
  25. end)