xmake.lua 1.0 KB

1234567891011121314151617181920212223242526
  1. package("plog")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/SergiusTheBest/plog")
  4. set_description("Portable, simple and extensible C++ logging library")
  5. set_license("MIT")
  6. add_urls("https://github.com/SergiusTheBest/plog/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/SergiusTheBest/plog.git")
  8. add_versions("1.1.10", "55a090fc2b46ab44d0dde562a91fe5fc15445a3caedfaedda89fe3925da4705a")
  9. add_versions("1.1.9", "058315b9ec9611b659337d4333519ab4783fad3f2f23b1cc7bb84d977ea38055")
  10. on_install(function (package)
  11. os.cp("include", package:installdir())
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include <plog/Log.h> // Step1: include the headers
  16. #include "plog/Initializers/RollingFileInitializer.h"
  17. void test()
  18. {
  19. plog::init(plog::debug, "Hello.txt"); // Step2: initialize the logger
  20. }
  21. ]]}))
  22. end)