Prechádzať zdrojové kódy

make linux+static compatible

xq114 5 rokov pred
rodič
commit
ab89145d96
1 zmenil súbory, kde vykonal 7 pridanie a 4 odobranie
  1. 7 4
      packages/b/blosc/xmake.lua

+ 7 - 4
packages/b/blosc/xmake.lua

@@ -9,16 +9,19 @@ package("blosc")
     add_versions("1.20.1", "42c4d3fcce52af9f8e2078f8f57681bfc711706a3330cb72b9b39e05ae18a413")
     add_versions("1.20.1", "42c4d3fcce52af9f8e2078f8f57681bfc711706a3330cb72b9b39e05ae18a413")
 
 
     add_deps("cmake")
     add_deps("cmake")
+    if is_plat("linux") then
+        add_syslinks("pthread")
+    end
 
 
     on_install("macosx", "linux", "windows", "mingw", function (package)
     on_install("macosx", "linux", "windows", "mingw", function (package)
         local configs = {"-DBUILD_TESTS=OFF", "-DBUILD_BENCHMARKS=OFF"}
         local configs = {"-DBUILD_TESTS=OFF", "-DBUILD_BENCHMARKS=OFF"}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         if package:config("shared") then
         if package:config("shared") then
-                table.insert(configs, "-DBUILD_SHARED=ON")
-                table.insert(configs, "-DBUILD_STATIC=OFF")
+            table.insert(configs, "-DBUILD_SHARED=ON")
+            table.insert(configs, "-DBUILD_STATIC=OFF")
         else
         else
-                table.insert(configs, "-DBUILD_SHARED=OFF")
-                table.insert(configs, "-DBUILD_STATIC=ON")
+            table.insert(configs, "-DBUILD_SHARED=OFF")
+            table.insert(configs, "-DBUILD_STATIC=ON")
         end
         end
         import("package.tools.cmake").install(package, configs)
         import("package.tools.cmake").install(package, configs)
     end)
     end)