summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author常峰 <[email protected]>2023-08-31 15:20:50 +0800
committer常峰 <[email protected]>2023-08-31 15:20:50 +0800
commit742d91fee8798cd17ac8c9745e858856b0402343 (patch)
tree6d18ce726bd19a9eebe4e3ab6b0b56e2872671c7
parent025c5e8415b456bf5f24e37322731615bd5ddea1 (diff)
Adjusted swig’s java library naming for various platforms. Supported mingw.
-rw-r--r--xmake/rules/swig/xmake.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/xmake/rules/swig/xmake.lua b/xmake/rules/swig/xmake.lua
index 853ded67a..00ef16afa 100644
--- a/xmake/rules/swig/xmake.lua
+++ b/xmake/rules/swig/xmake.lua
@@ -42,18 +42,24 @@ rule("swig.base")
end
end
else
- if target:is_plat("windows") then
+ if target:is_plat("windows", "mingw") then
target:set("extension", ".pyd")
end
end
elseif moduletype == "lua" then
target:set("prefixname", "")
- if not target:is_plat("windows") then
+ if not target:is_plat("windows", "mingw") then
target:set("extension", ".so")
end
elseif moduletype == "java" then
- target:set("prefixname", "lib")
- if not target:is_plat("windows") then
+ if target:is_plat("windows", "mingw") then
+ target:set("prefixname", "")
+ target:set("extension", ".dll")
+ elseif target:is_plat("macosx") then
+ target:set("prefixname", "lib")
+ target:set("extension", ".dylib")
+ elseif target:is_plat("linux") then
+ target:set("prefixname", "lib")
target:set("extension", ".so")
end
else