xmake.lua 1.0 KB

1234567891011121314151617181920212223
  1. package("wil")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/microsoft/wil")
  4. set_description("The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns.")
  5. set_license("MIT")
  6. add_urls("https://github.com/microsoft/wil.git")
  7. add_versions("2022.09.16", "5f4caba4e7a9017816e47becdd918fcc872039ba")
  8. add_versions("2023.12.16", "572b8728926eb9c8fc55572bb4b84bb92dabd79d")
  9. on_install("windows", function (package)
  10. os.cp("include", package:installdir())
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. #include <windows.h>
  15. #include <wil/win32_helpers.h>
  16. void test() {
  17. auto foo = wil::GetModuleInstanceHandle();
  18. }
  19. ]]}, {configs = {languages = "c++17"}, includes = {"windows.h", "wil/win32_helpers.h"}}))
  20. end)