Assimp: Add minizip dependency (#2246)

* Assimp: Add minizip dependency

Fixes link errors when minizip is installed on the system

* Update xmake.lua

* minizip: Add v1.2.13 and cmake/pkgconfig import files

* Update xmake.lua

* Try to fix assimp thirdparty libs search

* minizip: Fix version

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua
pull/2251/head
Jérôme Leclercq 2 years ago committed by GitHub
parent 5ed4a0e52e
commit 636d3f958d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      packages/a/assimp/xmake.lua
  2. 5
      packages/m/minizip/xmake.lua

@ -40,7 +40,7 @@ package("assimp")
add_configs("asan", {description = "Enable AddressSanitizer.", default = false, type = "boolean"})
add_configs("ubsan", {description = "Enable Undefined Behavior sanitizer.", default = false, type = "boolean"})
add_deps("cmake", "zlib")
add_deps("cmake", "minizip", "zlib")
if is_plat("windows") then
add_syslinks("advapi32")
@ -98,7 +98,22 @@ package("assimp")
io.replace("CMakeLists.txt", "CMAKE_COMPILER_IS_MINGW", "MINGW", {plain = true})
end
import("package.tools.cmake").install(package, configs)
-- Assimp CMakeLists doesn't find minizip on Windows
local ldflags
if package:is_plat("windows") then
local minizip = package:dep("minizip")
if minizip and not minizip:is_system() then
local fetchinfo = minizip:fetch({external = false})
if fetchinfo then
ldflags = {}
for _, linkdir in ipairs(fetchinfo.linkdirs) do
table.insert(ldflags, "/LIBPATH:" .. linkdir:gsub("\\", "/"))
end
end
end
end
import("package.tools.cmake").install(package, configs, {ldflags = ldflags, shflags = ldflags})
-- copy pdb
if package:is_plat("windows") then

@ -1,5 +1,4 @@
package("minizip")
set_homepage("https://www.zlib.net/")
set_description("Mini zip and unzip based on zlib")
set_license("zlib")
@ -9,12 +8,16 @@ package("minizip")
add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5")
add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff")
add_versions("v1.2.12", "d8688496ea40fb61787500e863cc63c9afcbc524468cedeb478068924eb54932")
add_versions("v1.2.13", "1525952a0a567581792613a9723333d7f8cc20b87a81f920fb8bc7e3f2251428")
add_deps("zlib")
on_install(function (package)
os.cd(path.join("contrib", "minizip"))
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
add_rules("utils.install.cmake_importfiles")
add_rules("utils.install.pkgconfig_importfiles")
add_requires("zlib")
target("minizip")
set_kind("$(kind)")

Loading…
Cancel
Save