fix static link to opencc (#481)

pull/484/head
Shiwei Wang 3 years ago committed by GitHub
parent 35f436f9b0
commit 309e355b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/o/opencc/xmake.lua

@ -17,6 +17,9 @@ package("opencc")
if package:is_plat("linux", "mingw") and not package:config("shared") then
package:add("links", "opencc", "marisa")
end
if not package:config("shared") then
package:add("defines", "Opencc_BUILT_AS_STATIC")
end
package:addenv("PATH", "bin")
end)
@ -29,4 +32,9 @@ package("opencc")
on_test("windows", "mingw@windows,msys", "linux", "macosx", "bsd", function (package)
assert(package:has_cfuncs("opencc_open", {includes = "opencc/opencc.h"}))
assert(package:check_cxxsnippets({test = [[
void test() {
opencc::Config config;
}
]]}, {includes = {"opencc/Config.hpp"}}))
end)

Loading…
Cancel
Save