add mingw for libwebp (#236)

pull/237/head
ruki 4 years ago committed by GitHub
parent b9aa3078c0
commit c539d35a6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      packages/l/libpng/xmake.lua
  2. 6
      packages/l/libtiff/xmake.lua
  3. 2
      packages/l/libwebp/xmake.lua

@ -12,16 +12,18 @@ package("libpng")
set_license("libpng-2.0")
add_deps("zlib")
if is_host("windows") then
if is_host("windows", "mingw") then
add_deps("cmake")
end
on_install("windows", function (package)
local configs = {"-DPNG_TESTS=OFF",
on_install("windows", "mingw", function (package)
local configs = {"-DPNG_TESTS=OFF", "-DPNG_BUILD_ZLIB=ON", "-DPNG_EXECUTABLES=OFF",
"-DPNG_SHARED=" .. (package:config("shared") and "ON" or "OFF"),
"-DPNG_STATIC=" .. (package:config("shared") and "OFF" or "ON"),
"-DPNG_DEBUG=" .. (package:debug() and "ON" or "OFF")}
import("package.tools.cmake").install(package, configs)
local zlib = assert(package:dep("zlib"):fetch(), "zlib not found!")
io.replace("CMakeLists.txt", "${ZLIB_LIBRARY}", table.unwrap(zlib.links), {plain = true})
import("package.tools.cmake").install(package, configs, {packagedeps = "zlib"})
end)
on_install("iphoneos", "android@linux,macosx", "macosx", "linux", function (package)

@ -8,12 +8,12 @@ package("libtiff")
add_versions("4.1.0", "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634")
add_deps("zlib")
if is_plat("windows") then
if is_plat("windows", "mingw") then
add_deps("cmake")
end
on_install("windows", function (package)
local configs = {}
on_install("windows", "mingw", function (package)
local configs = {"-Dzstd=OFF", "-Dlzma=OFF", "-Dwebp=OFF", "-Djpeg12=OFF", "-Djbig=OFF", "-Dpixarlog=OFF"}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

@ -26,7 +26,7 @@ package("libwebp")
add_syslinks("pthread")
end
on_install("linux", "macosx", "windows", function (package)
on_install("linux", "macosx", "windows", "mingw", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))

Loading…
Cancel
Save