Add libjpeg turbo mingw (#2341)

pull/2344/head
Caleb Kiage 1 year ago committed by GitHub
parent 06f7f825d2
commit 6f347dcc00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/l/libjpeg-turbo/xmake.lua

@ -27,7 +27,7 @@ package("libjpeg-turbo")
end end
end) end)
on_install("windows", "linux", "macosx", "android", function (package) on_install("windows", "linux", "macosx", "android", "mingw", function (package)
local configs = {} local configs = {}
local jpeg = package:config("jpeg") local jpeg = package:config("jpeg")
if jpeg == "7" then if jpeg == "7" then
@ -46,6 +46,9 @@ package("libjpeg-turbo")
if package:is_plat("windows") and package:config("vs_runtime"):startswith("MD") then if package:is_plat("windows") and package:config("vs_runtime"):startswith("MD") then
table.insert(configs, "-DWITH_CRT_DLL=ON") table.insert(configs, "-DWITH_CRT_DLL=ON")
end end
if package:is_plat("mingw") then
table.insert(configs, "-DCMAKE_SYSTEM_PROCESSOR=" .. package:arch())
end
if package:is_plat("windows") and package:is_arch("arm64") then if package:is_plat("windows") and package:is_arch("arm64") then
io.replace("CMakeLists.txt", 'message(STATUS "${BITS}-bit build (${CPU_TYPE})")', io.replace("CMakeLists.txt", 'message(STATUS "${BITS}-bit build (${CPU_TYPE})")',
'set(CPU_TYPE arm64)\nmessage(STATUS "${BITS}-bit build (${CPU_TYPE})")', {plain = true}) 'set(CPU_TYPE arm64)\nmessage(STATUS "${BITS}-bit build (${CPU_TYPE})")', {plain = true})

Loading…
Cancel
Save