libwebsockets: build static library only when necessary

This commit is contained in:
Robert Helgesson
2022-12-28 16:37:08 +01:00
parent 7e74ec53da
commit 7fb1be82f4
@@ -33,7 +33,13 @@ stdenv.mkDerivation rec {
"-DDISABLE_WERROR=ON"
"-DLWS_BUILD_HASH=no_hash"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DLWS_WITHOUT_TESTAPPS=ON"
++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON";
++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON"
++ (
if stdenv.hostPlatform.isStatic then
[ "-DLWS_WITH_SHARED=OFF" ]
else
[ "-DLWS_WITH_STATIC=OFF" "-DLWS_LINK_TESTAPPS_DYNAMIC=ON" ]
);
postInstall = ''
# Fix path that will be incorrect on move to "dev" output.