2
0

xmake.lua 761 B

12345678910111213141516171819
  1. package("wingetopt")
  2. set_homepage("https://github.com/alex85k/wingetopt")
  3. set_description("getopt library for Windows compilers")
  4. add_urls("https://github.com/alex85k/wingetopt.git")
  5. add_versions("2023.10.29", "e8531ed21b44f5a723c1dd700701b2a58ce3ea01")
  6. add_deps("cmake")
  7. on_install("windows", "mingw", function (package)
  8. local configs = {}
  9. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
  10. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  11. import("package.tools.cmake").install(package, configs)
  12. end)
  13. on_test(function (package)
  14. assert(package:has_cfuncs("getopt", {includes = "getopt.h"}))
  15. end)