xmake.lua 1.0 KB

123456789101112131415161718192021222324252627
  1. package("whereami")
  2. set_homepage("https://github.com/gpakosz/whereami")
  3. set_description("Locate the current running executable and the current running module/library on the file system 🔎")
  4. set_license("MIT")
  5. add_urls("https://github.com/gpakosz/whereami.git")
  6. add_versions("2024.08.26", "dcb52a058dc14530ba9ae05e4339bd3ddfae0e0e")
  7. on_install("!wasm", function (package)
  8. local configs = {}
  9. io.writefile("xmake.lua", [[
  10. add_rules("mode.release", "mode.debug")
  11. target("whereami")
  12. set_kind("$(kind)")
  13. add_files("src/*.c")
  14. add_headerfiles("src/(*.h)")
  15. add_includedirs("src")
  16. if is_plat("windows") and is_kind("shared") then
  17. add_rules("utils.symbols.export_all")
  18. end
  19. ]])
  20. import("package.tools.xmake").install(package)
  21. end)
  22. on_test(function (package)
  23. assert(package:has_cfuncs("wai_getExecutablePath", {includes = "whereami.h"}))
  24. end)