xmake.lua 1.5 KB

123456789101112131415161718192021222324252627282930
  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.3.2", "644adca91229d714efaeebf0c010cc795f888f6a1015bb7d42c2f0a45fe52f8b")
  9. add_versions("v6.3.1", "b92842cc37d3fe1a4d103929480045a40c39ba2efc15d7656f62e189d10d0bc4")
  10. add_versions("v6.3.0", "5a8b47c19ce705172cb1107451acbbb9fa7d8aa1e8f5356a2e682c16cf5532e9")
  11. add_versions("v6.2.0", "9dc1b287fb8c765a35791bf0deea0da81e52a969827bc2d8777f54f26ade588d")
  12. add_versions("v6.1.0", "d4118ccfd4f4edee29e0f6b3706979791ad537278e2f74818c150bb66f8fcc53")
  13. on_install("windows", "mingw", "msys", function (package)
  14. if package:is_plat("mingw") and package:is_arch("i386") then
  15. io.replace("WinReg/WinReg.hpp", "UNREFERENCED_PARAMETER(size);", "(void)size;", {plain = true})
  16. end
  17. os.cp("WinReg/WinReg.hpp", package:installdir("include/WinReg"))
  18. end)
  19. on_test(function (package)
  20. assert(package:check_cxxsnippets({test = [[
  21. #include <WinReg/WinReg.hpp>
  22. void test() {
  23. winreg::RegKey key{ HKEY_CURRENT_USER, L"SOFTWARE\\SomeKey" };
  24. }
  25. ]]}, {configs = {languages = "c++17"}}))
  26. end)