xmake.lua 937 B

1234567891011121314151617181920212223
  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.1.0", "d4118ccfd4f4edee29e0f6b3706979791ad537278e2f74818c150bb66f8fcc53")
  9. on_install("windows", "mingw", "msys", function (package)
  10. os.cp("WinReg/WinReg.hpp", package:installdir("include/WinReg"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. #include <WinReg/WinReg.hpp>
  15. void test() {
  16. winreg::RegKey key{ HKEY_CURRENT_USER, L"SOFTWARE\\SomeKey" };
  17. }
  18. ]]}, {configs = {languages = "c++17"}}))
  19. end)