瀏覽代碼

add config CMAKE_OSX_ARCHITECTURES for RmlUi (#1896)

* add config CMAKE_OSX_ARCHITECTURES

* Use arm64 only in macOS arm64 target
zeroxer 2 年之前
父節點
當前提交
ad607b4ad3
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/r/rmlui/xmake.lua

+ 3 - 0
packages/r/rmlui/xmake.lua

@@ -40,6 +40,9 @@ package("rmlui")
 
     on_install("windows", "macosx", "linux", function (package)
         local configs = {"-DBUILD_TESTING=OFF", "-DBUILD_SAMPLES=OFF"}
+        if package:is_plat("macosx") and package:is_arch("arm64") then
+            table.insert(configs, "-DCMAKE_OSX_ARCHITECTURES=arm64")
+        end
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DNO_FONT_INTERFACE_DEFAULT=" .. (package:config("freetype") and "OFF" or "ON"))