Skip to content

Commit 708c8d6

Browse files
committed
pixman: add support for Android and Windows ARM platforms
1 parent c272159 commit 708c8d6

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
@@ -46,6 +46,17 @@ package("pixman")
4646
"-Dgtk=disabled",
4747
}
4848
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
49+
if package:is_plat("android") then
50+
local ndk = package:toolchain("ndk"):config("ndk")
51+
if ndk then
52+
local cpu_features = path.join(ndk, "sources", "android", "cpufeatures")
53+
if os.isdir(cpu_features) then
54+
table.insert(configs, "-Dcpu-features-path=" .. path.unix(cpu_features))
55+
end
56+
end
57+
elseif package:is_plat("windows") and package:is_arch("arm.*") then
58+
table.join2(configs, {"-Darm-simd=disabled", "-Dneon=disabled", "-Da64-neon=disabled", "-Dmmx=disabled"})
59+
end
4960
io.replace("meson.build", "subdir('test')", "", {plain = true})
5061
io.replace("meson.build", "subdir('demos')", "", {plain = true})
5162
import("package.tools.meson").install(package, configs)

0 commit comments

Comments
 (0)