|
|
|
@ -5,6 +5,7 @@ package("cgal") |
|
|
|
|
set_license("LGPL-3.0") |
|
|
|
|
|
|
|
|
|
add_urls("https://github.com/CGAL/cgal/releases/download/v$(version)/CGAL-$(version)-library.zip") |
|
|
|
|
add_versions("6.0", "f4a66cf4e276a377d263ee3db627919d1000e29bf24664a5d0b8cb82081ef706") |
|
|
|
|
add_versions("5.6.1", "cf3900280d96847db8ac5e174d5e889f9764c7fa4e3d99f316f89910058335e6") |
|
|
|
|
add_versions("5.1.1", "ceca7ea896505941878f6c1fb7a7ae86653fdd9b3d87b276da72227f173a9cd2") |
|
|
|
|
add_versions("5.2.1", "ccdea67db79153417504f50c534cea3bb6b0e9754e7f32fb753fc19005114db0") |
|
|
|
@ -13,6 +14,7 @@ package("cgal") |
|
|
|
|
add_versions("5.5.2", "77b17ba5d43fe844c0eca7fb7eff7d5687174b037290c390f1251ef44cc4909b") |
|
|
|
|
|
|
|
|
|
add_configs("header_only", {description = "Use header only version.", default = true, type = "boolean"}) |
|
|
|
|
add_configs("gmp", {description = "Use gmp/mpfr.", default = is_plat("macosx", "linux"), type = "boolean"}) |
|
|
|
|
|
|
|
|
|
if is_plat("mingw") and is_subhost("msys") then |
|
|
|
|
add_extsources("pacman::cgal") |
|
|
|
@ -24,14 +26,21 @@ package("cgal") |
|
|
|
|
|
|
|
|
|
add_deps("cmake") |
|
|
|
|
add_deps("boost", "eigen") |
|
|
|
|
if is_plat("macosx", "linux") then |
|
|
|
|
add_deps("gmp", "mpfr") |
|
|
|
|
on_check("windows", "mingw", function (package) |
|
|
|
|
if not package:config("header_only") and (package:version():lt("6.0") or package:config("gmp")) then |
|
|
|
|
raise("GMP is not supported on windows yet!") |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_load("windows", "mingw", function (package) |
|
|
|
|
on_load("windows", "mingw", "macosx", "linux", function (package) |
|
|
|
|
if package:config("header_only") then |
|
|
|
|
package:set("kind", "library", {headeronly = true}) |
|
|
|
|
end |
|
|
|
|
if package:config("gmp") then |
|
|
|
|
package:add("deps", "gmp", "mpfr") |
|
|
|
|
else |
|
|
|
|
package:add("defines", "CGAL_DISABLE_GMP") |
|
|
|
|
package:add("defines", "CGAL_NO_GMP") |
|
|
|
|
if not package:config("header_only") then |
|
|
|
|
raise("Non-header-only version is not supported yet!") |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
@ -41,6 +50,7 @@ package("cgal") |
|
|
|
|
end |
|
|
|
|
local configs = {"-DBUILD_TESTING=OFF", "-DBUILD_DOC=OFF"} |
|
|
|
|
table.insert(configs, "-DCGAL_HEADER_ONLY=" .. (package:config("header_only") and "ON" or "OFF")) |
|
|
|
|
table.insert(configs, "-DCGAL_DISABLE_GMP=" .. (package:config("gmp") and "OFF" or "ON")) |
|
|
|
|
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")) |
|
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
@ -55,5 +65,5 @@ package("cgal") |
|
|
|
|
DT::Point p; |
|
|
|
|
std::vector<DT::Point> points; |
|
|
|
|
} |
|
|
|
|
]]}, {configs = {languages = "c++14"}, includes = {"CGAL/Epick_d.h", "CGAL/Delaunay_triangulation.h"}})) |
|
|
|
|
]]}, {configs = {languages = "c++17"}, includes = {"CGAL/Epick_d.h", "CGAL/Delaunay_triangulation.h"}})) |
|
|
|
|
end) |
|
|
|
|