Skip to content

Commit e2cdc9d

Browse files
committed
pixman: add support for Android and Windows ARM platforms
1 parent 6ccc239 commit e2cdc9d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/p/pixman/xmake.lua

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ package("pixman")
3535
end)
3636
end
3737

38-
on_install("!android and !cross and (!windows or windows|!arm64)", function (package)
38+
on_install(function (package)
3939
if package:is_plat("windows") and package:config("shared") then
4040
package:add("defines", "PIXMAN_API=__declspec(dllimport)")
4141
end
@@ -48,6 +48,17 @@ package("pixman")
4848
"-Dgtk=disabled",
4949
}
5050
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
51+
if package:is_plat("android") then
52+
local ndk = package:toolchain("ndk"):config("ndk")
53+
if ndk then
54+
local cpu_features = path.join(ndk, "sources", "android", "cpufeatures")
55+
if os.isdir(cpu_features) then
56+
table.insert(configs, "-Dcpu-features-path=" .. path.unix(cpu_features))
57+
end
58+
end
59+
elseif package:is_plat("windows") and package:is_arch("arm.*") then
60+
table.join2(configs, {"-Darm-simd=disabled", "-Dneon=disabled", "-Da64-neon=disabled", "-Dmmx=disabled"})
61+
end
5162
import("package.tools.meson").install(package, configs)
5263
end)
5364

0 commit comments

Comments
 (0)