Parcourir la source

improve pic for snappy

ruki il y a 4 ans
Parent
commit
11354cac02
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      packages/s/snappy/xmake.lua

+ 3 - 1
packages/s/snappy/xmake.lua

@@ -18,7 +18,9 @@ package("snappy")
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DSNAPPY_REQUIRE_AVX=" .. (package:config("avx") and "ON" or "OFF"))
         table.insert(configs, "-DSNAPPY_REQUIRE_AVX2=" .. (package:config("avx2") and "ON" or "OFF"))
-        table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
+        if package:config("pic") ~= false then
+            table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
+        end
         import("package.tools.cmake").install(package, configs)
     end)