xmake.lua 998 B

123456789101112131415161718192021222324252627
  1. package("libfixmath")
  2. set_homepage("https://code.google.com/p/libfixmath/")
  3. set_description("Cross Platform Fixed Point Maths Library")
  4. set_license("MIT")
  5. add_urls("https://github.com/PetteriAimonen/libfixmath.git")
  6. add_versions("2023.08.06", "d308e466e1a09118d03f677c52e5fbf402f6fdd0")
  7. on_install(function (package)
  8. io.writefile("xmake.lua", [[
  9. add_rules("mode.debug", "mode.release")
  10. set_languages("c++11")
  11. target("fixmath")
  12. set_kind("$(kind)")
  13. add_files("libfixmath/*.c")
  14. add_headerfiles("(libfixmath/*.h)", "(libfixmath/*.hpp)")
  15. if is_plat("windows") and is_kind("shared") then
  16. add_rules("utils.symbols.export_all")
  17. end
  18. ]])
  19. import("package.tools.xmake").install(package)
  20. end)
  21. on_test(function (package)
  22. assert(package:has_cfuncs("uint32_log2", {includes = "libfixmath/uint32.h"}))
  23. end)