Skip to content

Commit

Permalink
qhull: enable some platform (#5228)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Sep 14, 2024
1 parent ec608a9 commit 27be202
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/q/qhull/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
package("qhull")

set_homepage("http://www.qhull.org/")
set_description("Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram.")

add_urls("https://github.com/qhull/qhull/archive/refs/tags/$(version).tar.gz",
"https://github.com/qhull/qhull.git")

add_versions("2020.2", "59356b229b768e6e2b09a701448bfa222c37b797a84f87f864f97462d8dbc7c5")

add_deps("cmake")
on_install("windows", "macosx", "linux", "mingw", function (package)

on_install(function (package)
if package:is_plat("windows") and package:config("shared") then
package:add("defines", "qh_dllimport")
end

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"))
table.insert(configs, "-DBUILD_STATIC_LIBS=" .. (package:config("shared") and "OFF" or "ON"))
if package:config("pic") ~= false then
table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
end
import("package.tools.cmake").install(package, configs)
end)

Expand Down

0 comments on commit 27be202

Please sign in to comment.