[Libwebsockets] lwsws build on linux mint 20.1

Andy Green andy at warmcat.com
Tue Jul 6 05:18:16 CEST 2021

On 7/6/21 1:24 AM, Steve Calfee wrote:
> Hi,
> I don't really understand all the cmake stuff. But on my linux system 
> the "main" branch does not build lwsws. I have to add -luv to get the 
> link to work.
> In .../libwebsockets/lwsws/CMakeFiles/lwsws.dir/link.txt if I change to 
> this it works:
> /usr/bin/cc   -rdynamic CMakeFiles/lwsws.dir/main.o  -o lwsws 
>   -lwebsockets -luv
> Here is the cmake output:
> .../libweb/libwebsockets/lwsws$ cmake .  -DLWS_WITH_LWSWS=1

lwsws is built as part of lws build, it's not designed to be built 
standalone.  Lots of subdirs have their own CMakeLists.txt that is 
referred by parent levels, it doesn't necessarily mean you can build 
from inside a subdir as the toplevel build context just because it has a 
CMakeLists.txt in it.

If you build lws from the toplevel with -DLWS_WITH_LWSWS=1 it should 
build lwsws without problems.  I use it myself and it's built as part of 
the CI, eg, main on Focal building lwsws



More information about the Libwebsockets mailing list