update cgal (#529)

pull/530/head
Hoildkv 4 years ago committed by GitHub
parent cfa2d8521d
commit 5d845a661d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      packages/c/cgal/xmake.lua

@ -7,6 +7,7 @@ package("cgal")
add_urls("https://github.com/CGAL/cgal/releases/download/v$(version)/CGAL-$(version)-library.zip")
add_versions("5.1.1", "ceca7ea896505941878f6c1fb7a7ae86653fdd9b3d87b276da72227f173a9cd2")
add_versions("5.2.1", "ccdea67db79153417504f50c534cea3bb6b0e9754e7f32fb753fc19005114db0")
add_versions("5.3", "49ccfb6b72a78d03ab026c6502099ba9358cf604d9d1f51c33e90b314635fe35")
add_configs("header_only", {description = "Use header only version.", default = true, type = "boolean"})
@ -24,13 +25,9 @@ package("cgal")
end)
on_install("windows", "macosx", "linux", function (package)
if package:config("header_only") then
os.mv("include", package:installdir())
os.mv("lib", package:installdir())
return
end
io.gsub("CMakeLists.txt", "install%(DIRECTORY.-%/demo%/.-%/demo%/.-%)", "")
local configs = {"-DBUILD_TESTING=OFF", "-DBUILD_DOC=OFF"}
table.insert(configs, "-DCGAL_HEADER_ONLY=OFF")
table.insert(configs, "-DCGAL_HEADER_ONLY=" .. (package:config("header_only") and "ON" or "OFF"))
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)

Loading…
Cancel
Save