fix libpng and zlib (#266)

pull/270/head
ruki 4 years ago committed by GitHub
parent dfbd37f744
commit adb300acba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/cross_musl.yml
  2. 4
      packages/l/libpng/xmake.lua
  3. 2
      packages/z/zlib/xmake.lua

@ -26,5 +26,5 @@ jobs:
- name: Tests
run: |
xmake l ./scripts/test.lua -D -p cross --toolchain=musl --sdk=`pwd`/${{ matrix.cross }}-cross
xmake l ./scripts/test.lua -D -p cross --toolchain=muslcc --sdk=`pwd`/${{ matrix.cross }}-cross

@ -18,7 +18,7 @@ package("libpng")
add_requires("zlib")
target("png")
set_kind("$(kind)")
add_files("*.c")
add_files("*.c|example.c")
if is_arch("x86", "x64", "i386", "x86_64") then
add_files("intel/*.c")
add_defines("PNG_INTEL_SSE_OPT=1")
@ -42,6 +42,8 @@ package("libpng")
local configs = {}
if package:config("shared") then
configs.kind = "shared"
elseif not package:is_plat("windows", "mingw") and package:config("pic") ~= false then
configs.cxflags = "-fPIC"
end
os.cp("scripts/pnglibconf.h.prebuilt", "pnglibconf.h")
import("package.tools.xmake").install(package, configs)

@ -50,6 +50,8 @@ package("zlib")
local configs = {}
if package:config("shared") then
configs.kind = "shared"
elseif not package:is_plat("windows", "mingw") and package:config("pic") ~= false then
configs.cxflags = "-fPIC"
end
import("package.tools.xmake").install(package, configs)
end)

Loading…
Cancel
Save