xmake.lua 1.1 KB

12345678910111213141516171819202122232425
  1. package("cli11")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/CLIUtils/CLI11")
  4. set_description("CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.")
  5. set_license("BSD")
  6. add_urls("https://github.com/CLIUtils/CLI11/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/CLIUtils/CLI11.git")
  8. add_versions("v2.4.1", "73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58")
  9. add_versions("v2.3.2", "aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22")
  10. add_versions("v2.2.0", "d60440dc4d43255f872d174e416705f56ba40589f6eb07727f76376fb8378fd6")
  11. if not is_host("windows") then
  12. add_extsources("pkgconfig::CLI11")
  13. end
  14. on_install("windows", "linux", "macosx", function (package)
  15. os.cp("include", package:installdir())
  16. end)
  17. on_test(function (package)
  18. assert(package:check_cxxsnippets({test = [[
  19. CLI::App app{"Test", "test"};
  20. ]]}, {configs = {languages = "cxx11"}, includes = "CLI/CLI.hpp"}))
  21. end)