Forráskód Böngészése

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

Shiwei Wang 3 éve
szülő
commit
d44f8c69ab
2 módosított fájl, 5 hozzáadás és 5 törlés
  1. 2 2
      packages/c/cgal/xmake.lua
  2. 3 3
      packages/l/libigl/xmake.lua

+ 2 - 2
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

+ 3 - 3
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"}