make libigl(and cgal) support mingw (#1423)

pull/1424/head
Shiwei Wang 2 years ago committed by GitHub
parent 97429e13ef
commit d44f8c69ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/c/cgal/xmake.lua
  2. 6
      packages/l/libigl/xmake.lua

@ -26,14 +26,14 @@ package("cgal")
add_deps("gmp", "mpfr")
end
on_load("windows", function (package)
on_load("windows", "mingw", function (package)
package:add("defines", "CGAL_NO_GMP")
if not package:config("header_only") then
raise("Non-header-only version is not supported yet!")
end
end)
on_install("windows", "macosx", "linux", function (package)
on_install("windows", "mingw", "macosx", "linux", function (package)
if package:version():le("5.3") then
io.gsub("CMakeLists.txt", "install%(DIRECTORY.-%/demo%/.-%/demo%/.-%)", "")
end

@ -23,7 +23,7 @@ package("libigl")
end
add_deps("cmake", "eigen")
on_load("macosx", "linux", "windows", function (package)
on_load("macosx", "linux", "windows", "mingw", function (package)
if not package:config("header_only") then
raise("Non-header-only version is not supported yet!")
end
@ -35,13 +35,13 @@ package("libigl")
end
end)
on_install("macosx", "linux", "windows", function (package)
on_install("macosx", "linux", "windows", "mingw", function (package)
if package:config("imgui") then
local igl_imgui_dir = package:resourcefile("libigl_imgui")
os.cp(path.join(igl_imgui_dir, "imgui_fonts_droid_sans.h"), package:installdir("include"))
end
if package:config("header_only") then
os.mv("include/igl", package:installdir("include"))
os.cp("include/igl", package:installdir("include"))
return
end
local configs = {"-DLIBIGL_BUILD_TESTS=OFF", "-DLIBIGL_BUILD_TUTORIALS=OFF", "-DLIBIGL_SKIP_DOWNLOAD=ON"}

Loading…
Cancel
Save