libnest2d & polyclipping: fix windows shared

pull/4444/head
star9029 5 months ago
parent 23c0190495
commit 02784f8e84
  1. 4
      packages/l/libnest2d/port/xmake.lua
  2. 10
      packages/l/libnest2d/xmake.lua
  3. 6
      packages/p/polyclipping/xmake.lua

@ -13,3 +13,7 @@ target("libnest2d")
add_defines("LIBNEST2D_GEOMETRIES_clipper", "LIBNEST2D_OPTIMIZER_nlopt")
add_includedirs("include", {public = true})
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all", {export_classes = true})
end

@ -6,17 +6,13 @@ package("libnest2d")
add_urls("https://github.com/tamasmeszaros/libnest2d.git")
add_versions("2022.11.16", "663daa69e1d7478669f714218e27681edbc96640")
add_deps("nlopt", "polyclipping", "boost")
add_defines("LIBNEST2D_GEOMETRIES_clipper", "LIBNEST2D_OPTIMIZER_nlopt")
on_load(function (package)
package:add("defines", "LIBNEST2D_GEOMETRIES_clipper")
package:add("defines", "LIBNEST2D_OPTIMIZER_nlopt")
end)
add_deps("nlopt", "polyclipping", "boost")
on_install("linux", "windows", "macosx", function (package)
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
local configs = {}
import("package.tools.xmake").install(package, configs)
import("package.tools.xmake").install(package)
end)
on_test(function (package)

@ -7,7 +7,6 @@ package("polyclipping")
add_versions("6.4.2", "a14320d82194807c4480ce59c98aa71cd4175a5156645c4e2b3edd330b930627")
on_install(function (package)
local configs = {}
io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug")
target("polyclipping")
@ -15,8 +14,11 @@ package("polyclipping")
set_languages("cxx11")
add_files("cpp/*.cpp")
add_headerfiles("cpp/(*.hpp)")
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all", {export_classes = true})
end
]])
import("package.tools.xmake").install(package, configs)
import("package.tools.xmake").install(package)
end)
on_test(function (package)

Loading…
Cancel
Save