xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. package("objfw")
  2. set_homepage("https://objfw.nil.im")
  3. set_description("[Official Mirror] A portable framework for the Objective-C language.")
  4. add_urls("https://github.com/ObjFW/ObjFW.git")
  5. add_versions("2023.03.18", "86cec7d17dd323407f30fc5947e0e92cc307e869")
  6. add_deps("autoconf", "automake", "libtool")
  7. if is_plat("macosx") then
  8. add_syslinks("objc")
  9. add_frameworks("CoreFoundation")
  10. end
  11. on_install("linux", "macosx", function (package)
  12. local configs = {"--without-tls"}
  13. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  14. if package:debug() then
  15. table.insert(configs, "--enable-debug")
  16. end
  17. import("package.tools.autoconf").install(package, configs)
  18. end)
  19. on_test(function (package)
  20. assert(package:check_msnippets({test = [[
  21. #include <stdio.h>
  22. void test() {
  23. OFString* string = @"hello";
  24. printf("%s\n", [string UTF8String]);
  25. }
  26. ]]}, {includes = {"ObjFW/ObjFW.h"}}))
  27. end)