Skip to content

Commit

Permalink
libsodium: Fix static and shared build
Browse files Browse the repository at this point in the history
Both libs were built
  • Loading branch information
SirLynix authored Jul 6, 2024
1 parent da0004e commit 73e9ad5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/l/libsodium/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ package("libsodium")
end

if package:is_plat("linux", "macosx") then
import("package.tools.autoconf").install(package)
local configs = {}
if package:debug() then
table.insert(configs, "--enable-debug")
end
if package:config("shared") then
table.insert(configs, "--enable-static=no")
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-static=yes")
table.insert(configs, "--enable-shared=no")
end
import("package.tools.autoconf").install(package, configs)
else
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
import("package.tools.xmake").install(package)
Expand Down

0 comments on commit 73e9ad5

Please sign in to comment.