瀏覽代碼

qhull: enable some platform (#5228)

star9029 10 月之前
父節點
當前提交
27be202903
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      packages/q/qhull/xmake.lua

+ 7 - 5
packages/q/qhull/xmake.lua

@@ -1,21 +1,23 @@
 package("qhull")
 package("qhull")
-
     set_homepage("http://www.qhull.org/")
     set_homepage("http://www.qhull.org/")
     set_description("Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram.")
     set_description("Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furthest-site Delaunay triangulation, and furthest-site Voronoi diagram.")
 
 
     add_urls("https://github.com/qhull/qhull/archive/refs/tags/$(version).tar.gz",
     add_urls("https://github.com/qhull/qhull/archive/refs/tags/$(version).tar.gz",
              "https://github.com/qhull/qhull.git")
              "https://github.com/qhull/qhull.git")
+
     add_versions("2020.2", "59356b229b768e6e2b09a701448bfa222c37b797a84f87f864f97462d8dbc7c5")
     add_versions("2020.2", "59356b229b768e6e2b09a701448bfa222c37b797a84f87f864f97462d8dbc7c5")
 
 
     add_deps("cmake")
     add_deps("cmake")
-    on_install("windows", "macosx", "linux", "mingw", function (package)
+
+    on_install(function (package)
+        if package:is_plat("windows") and package:config("shared") then
+            package:add("defines", "qh_dllimport")
+        end
+
         local configs = {}
         local configs = {}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         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"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DBUILD_STATIC_LIBS=" .. (package:config("shared") and "OFF" or "ON"))
         table.insert(configs, "-DBUILD_STATIC_LIBS=" .. (package:config("shared") and "OFF" or "ON"))
-        if package:config("pic") ~= false then
-            table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
-        end
         import("package.tools.cmake").install(package, configs)
         import("package.tools.cmake").install(package, configs)
     end)
     end)