Skip to content

Commit

Permalink
use builtin sodium on windows only
Browse files Browse the repository at this point in the history
  • Loading branch information
gafferongames committed Dec 26, 2023
1 parent 4ccf685 commit 2264d52
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,63 @@ solution "netcode"
optimize "Speed"
defines { "NETCODE_RELEASE" }

project "sodium"
project "sodium-builtin"
kind "StaticLib"
files {
"sodium/**.c",
"sodium/**.h",
}
filter { "system:not windows", "platforms:*x64 or *avx or *avx2" }
files {
"sodium/**.S"
}
filter { "action:gmake" }
buildoptions { "-Wno-unused-parameter", "-Wno-unused-function", "-Wno-unknown-pragmas", "-Wno-unused-variable", "-Wno-type-limits" }
language "C"
files { "sodium/dummy.c" }
filter "system:windows"
files {
"sodium/**.c",
"sodium/**.h",
}
filter { "system:not windows", "platforms:*x64 or *avx or *avx2" }
files {
"sodium/**.S"
}
filter { "action:gmake*" }
buildoptions { "-Wno-unused-parameter", "-Wno-unused-function", "-Wno-unknown-pragmas", "-Wno-unused-variable", "-Wno-type-limits" }

project "test"
files { "test.cpp" }
links { "sodium" }
filter "system:windows"
links { "sodium-builtin" }
filter "system:not windows"
links { "sodium" }

project "soak"
files { "soak.c", "netcode.c" }
links { "sodium" }
filter "system:windows"
links { "sodium-builtin" }
filter "system:not windows"
links { "sodium" }

project "profile"
files { "profile.c", "netcode.c" }
links { "sodium" }
filter "system:windows"
links { "sodium-builtin" }
filter "system:not windows"
links { "sodium" }

project "client"
files { "client.c", "netcode.c" }
links { "sodium" }
filter "system:windows"
links { "sodium-builtin" }
filter "system:not windows"
links { "sodium" }

project "server"
files { "server.c", "netcode.c" }
links { "sodium" }
filter "system:windows"
links { "sodium-builtin" }
filter "system:not windows"
links { "sodium" }

project "client_server"
files { "client_server.c", "netcode.c" }
links { "sodium" }
filter "system:windows"
links { "sodium-builtin" }
filter "system:not windows"
links { "sodium" }

newaction
{
Expand Down

0 comments on commit 2264d52

Please sign in to comment.