2
0

xmake.lua 1.0 KB

123456789101112131415161718192021222324
  1. package("winreg")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/GiovanniDicanio/WinReg")
  4. set_description("Convenient high-level C++ wrapper around the Windows Registry API")
  5. set_license("MIT")
  6. add_urls("https://github.com/GiovanniDicanio/WinReg/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/GiovanniDicanio/WinReg.git")
  8. add_versions("v6.2.0", "9dc1b287fb8c765a35791bf0deea0da81e52a969827bc2d8777f54f26ade588d")
  9. add_versions("v6.1.0", "d4118ccfd4f4edee29e0f6b3706979791ad537278e2f74818c150bb66f8fcc53")
  10. on_install("windows", "mingw", "msys", function (package)
  11. os.cp("WinReg/WinReg.hpp", package:installdir("include/WinReg"))
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include <WinReg/WinReg.hpp>
  16. void test() {
  17. winreg::RegKey key{ HKEY_CURRENT_USER, L"SOFTWARE\\SomeKey" };
  18. }
  19. ]]}, {configs = {languages = "c++17"}}))
  20. end)