brotli: add link to libbrotlicommon for static lib. (#1089)

Refer to https://github.com/xmake-io/xmake-repo/pull/1074
pull/1091/head
Chen Yufei 3 years ago committed by GitHub
parent c8b5b4560a
commit 85c7897197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      packages/b/brotli/port/xmake.lua

@ -12,7 +12,11 @@ end
target("brotlienc")
set_kind("$(kind)")
add_deps("brotlicommon")
add_rules("utils.install.pkgconfig_importfiles", {filename = "libbrotlienc.pc"})
local links = {"brotlienc"}
if is_kind("static") then
table.insert(links, "brotlicommon")
end
add_rules("utils.install.pkgconfig_importfiles", {filename = "libbrotlienc.pc", links = links})
add_includedirs("c/include", {public = true})
add_files("c/enc/*.c")
if is_kind("shared") and is_plat("windows") then
@ -23,7 +27,11 @@ target("brotlienc")
target("brotlidec")
set_kind("$(kind)")
add_deps("brotlicommon")
add_rules("utils.install.pkgconfig_importfiles", {filename = "libbrotlidec.pc"})
local links = {"brotlidec"}
if is_kind("static") then
table.insert(links, "brotlicommon")
end
add_rules("utils.install.pkgconfig_importfiles", {filename = "libbrotlidec.pc", links = links})
add_includedirs("c/include", {public = true})
add_files("c/dec/*.c")
if is_kind("shared") and is_plat("windows") then

Loading…
Cancel
Save