diff --git a/packages/s/snappy/xmake.lua b/packages/s/snappy/xmake.lua index d0364bf7f..e6bdcfaad 100644 --- a/packages/s/snappy/xmake.lua +++ b/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)