[Libwebsockets] CMake project for Libwebsockets and more

"Andy Green (林安廸)" andy at warmcat.com
Thu Feb 7 14:21:06 CET 2013

On 07/02/13 20:14, the mail apparently from Joakim Söderberg included:
> Hello again,
> I've now added CMake instructions to the README as well. (Same repos and
> branch)

Thanks I added it.

I add autotools support for the same and confirmed it's working on 
current CyaSSL


I dunno if this breaks your Cmake CyaSSL scheme... it should be enough 
now to just define USE_CYASSL along with LWS_OPENSSL_SUPPORT, without 
giving directories, ie, assuming CyaSSL is installed in the normal place.

I added some stuff I worked on during a flight yesterday... if you do 
anything with headers, this is worth being aware of



> On Wed, Feb 6, 2013 at 11:44 PM, Andy Green <andy at warmcat.com
> <mailto:andy at warmcat.com>> wrote:
>     Hi -
>     Joakim's cmake stuff is meant to replace needing to provide vs
>     project files... that's good because there's no single project file
>     we can provide that works on all the vs versions out there.
>     Iirc back in the day when I used vs, you can probably make a stub
>     project file that wraps an "external makefile".
>     At any rate Joakim seems to have a complete cmake solution already
>     (which is on the libwebsockets.org <http://libwebsockets.org> git
>     now). You should probably capture your changes, ignoring cmake, and
>     apply them again to the latest git. Then you can switch to Joakim's
>     cmake solution.
>     -Andy
>     FNA <aqiruse at gmail.com <mailto:aqiruse at gmail.com>> wrote:
>         I have ubuntu, Netbeans on Ubuntu and Windows, as well as VS
>         2008, 2010. If I can get a copy of the sources, I can check it
>         to make sure it compiles as soon as I have a chance. I have a
>         version of chrome26 sources I dl'd from the site that compiles
>         and seems to work with my VS2008 since that is what I use
>         mainly. Had to add afew tags like to the syslog stuff since my
>         compiler does not have that, and add the Windows version of
>         non-blocking sockets using #ifdef's. Just minor changes like
>         that, but I have the chrome26 compiling in VS 2008.I excluded
>         the deamon.c from the project in VS 2008. Now I just need to
>         figure out if the error is in my html test page or in something
>         i did to the library. Working on that. I have basic cmake files
>         but have not finished them yet. Can test the compilation part if
>         i can get the cmake files.
>         On Wed, Feb 6, 2013 at 2:20 AM, "Andy Green (林安廸)"
>         <andy at warmcat.com <mailto:andy at warmcat.com>> wrote:
>             On 06/02/13 02:08, the mail apparently from Joakim Söderberg
>             included:
>                 Hello,
>                 My repos, the branch is "newcmake":
>                 git://github.com/__JoakimSoderberg/libwebsockets.__git
>                 <http://github.com/JoakimSoderberg/libwebsockets.git>
>                 <http://github.com/__JoakimSoderberg/libwebsockets.__git
>                 <http://github.com/JoakimSoderberg/libwebsockets.git>>
>                 First of all, the Windows build was in the current
>                 upstream repos was
>                 broken in several ways, I've fixed some (crash) bugs
>                 relating to that.
>                 See the my commit log for specifics.
>             I see... you've been busy!  Nice to see the patches on top
>             of almost HEAD cleanly.
>                 Anyway. I've made a CMake project file for Libwebsockets
>                 which would be
>                 nice if it could be added upstream. It contains most of
>                 the features
>                 that the autoconf project does, plus some more. Most
>                 importantly, it
>                 vastly improves the Windows experience, without the need
>                 of manually
>                 editing a bunch of Visual Studio projects for different
>                 targets.
>             Yes that was always an asspain, especially since I don't
>             have a use for Windows builds myself it was always prone to
>             rot.  Previously we had two contributors working on it with
>             different VS versions and committing different and
>             incompatible project files... that's not really workable.
>               Having a Cmake text file is much better.
>                 I've also added support for using the CyaSSL library
>                 which has a OpenSSL
>                 compatibility layer. This is currently only supported in
>                 the CMake
>                 project (because of my lack of autoconf skills). Note
>                 that there is a
>                 crash bug in their current official version when
>                 SSL_free() is called
>                 when after using BIO_new_socket(). I've done a pull
>                 request for a fix,
>                 https://github.com/cyassl/__cyassl/pull/23
>                 <https://github.com/cyassl/cyassl/pull/23>
>                 Tested on:
>                 - Windows XP
>                 - Linux
>                 - NetBSD
>                 - OSX
>             Great job, thanks for the patches: all applied.
>             http://git.libwebsockets.org/__cgi-bin/cgit/libwebsockets/
>             <http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/>
>                 More about CMake:
>                 http://cmake.org/
>             At some point I will try your Cmake file in Linux and try to
>             understand if we can switch over.  I didn't have time to
>             learn Cmake for no real advatange (since I personally don't
>             use Windows), but since you have contributed it that's much
>             easier to consider now.
>                 P.S.
>                 How come this project is not on github anyway? At least
>                 mirrored there?
>             OK.  I created this
>             https://github.com/warmcat/__libwebsockets
>             <https://github.com/warmcat/libwebsockets>
>             and added it to my push script so it will mirror
>             git.libwebsockets.org <http://git.libwebsockets.org> there
>             every push.
>             Thanks again for your work and contribution!
>             -Andy
>             _________________________________________________
>             Libwebsockets mailing list
>             Libwebsockets at ml.__libwebsockets.org
>             <mailto:Libwebsockets at ml.libwebsockets.org>
>             http://ml.libwebsockets.org/__mailman/listinfo/libwebsockets
>             <http://ml.libwebsockets.org/mailman/listinfo/libwebsockets>
>         --
>         --A programmer started to cuss
>         --Because getting to sleep was a fuss
>         --As he lay there in bed
>         --Looping 'round in his head
>         --was: while( !asleep() ) sheep++;
>         --Nothing is impossible! It is merely a matter of figuring out How?

More information about the Libwebsockets mailing list