From d44f8c69ab2eea84268e18fee613fd771c4dc545 Mon Sep 17 00:00:00 2001 From: Shiwei Wang <4977975+wsw0108@users.noreply.github.com> Date: Thu, 18 Aug 2022 22:32:18 +0800 Subject: [PATCH] make libigl(and cgal) support mingw (#1423) --- packages/c/cgal/xmake.lua | 4 ++-- packages/l/libigl/xmake.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/c/cgal/xmake.lua b/packages/c/cgal/xmake.lua index 148e5588f..3598761af 100644 --- a/packages/c/cgal/xmake.lua +++ b/packages/c/cgal/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 diff --git a/packages/l/libigl/xmake.lua b/packages/l/libigl/xmake.lua index 4d34499cb..d989b42b1 100644 --- a/packages/l/libigl/xmake.lua +++ b/packages/l/libigl/xmake.lua @@ -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"}