xmake.lua 934 B

123456789101112131415161718192021
  1. package("hyperscan")
  2. set_homepage("https://www.hyperscan.io")
  3. set_description("High-performance regular expression matching library")
  4. set_license("BSD-3")
  5. add_urls("https://github.com/intel/hyperscan/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/intel/hyperscan.git")
  7. add_versions("v5.4.2", "32b0f24b3113bbc46b6bfaa05cf7cf45840b6b59333d078cc1f624e4c40b2b99")
  8. add_deps("cmake", "boost", "ragel", "python")
  9. on_install("linux", "windows|!arm*", function (package)
  10. local configs = {}
  11. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
  12. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  13. import("package.tools.cmake").install(package, configs)
  14. end)
  15. on_test(function (package)
  16. assert(package:has_cxxfuncs("hs_compile", {includes = "hs/hs.h"}))
  17. end)