[Libwebsockets] someth / CMake

"Andy Green (林安廸)" andy at warmcat.com
Tue Feb 19 03:35:45 CET 2013


On 19/02/13 08:21, the mail apparently from Joakim Söderberg included:
> Hello!
>
> I assumed the FindGit module was available since CMake 2.6, but I was
> wrong. I use 2.8 myself... That change works :)
>
> I've now implemented a "make install" that does everything the autoblah
> does (I think). See commit log for more info...
> (Still some stuff to do on Windows, haven't tested on it yet)
>
> https://github.com/JoakimSoderberg/libwebsockets/commits/cmake-install

Great job.... that worked fine here.  I pushed those two patches and 
added a little one on top documenting how to do --prefix= equivalent, 
which I ran into immediately testing it.

I'll switch here for a bit and see what happens, obviously running two 
parallel build systems for an extended period is just going to be 
trouble.  But I'm a somewhat wary since I understand enough of the 
autotools stuff to maintain it and it's not the case with CMake for me yet.

What you've done looks pretty complete now, I don't think make dist 
(makes a tarball with the active sources only) is in there but not sure 
that's a big problem.  The out-of-tree build (much preferred) suggests 
you can just tar the top level anyway.

Thanks again for your work on this!

-Andy

> On Mon, Feb 18, 2013 at 1:29 PM, "Andy Green (林安廸)" <andy at warmcat.com
> <mailto:andy at warmcat.com>> wrote:
>
>     On 18/02/13 19:58, the mail apparently from Edwin van den Oetelaar
>     included:
>
>         rm CMakeCache.txt
>         cd build
>         cmake ../
>         -- The C compiler identification is GNU
>         -- The CXX compiler identification is GNU
>         -- Check for working C compiler: /usr/bin/gcc
>         -- Check for working C compiler: /usr/bin/gcc -- works
>         -- Detecting C compiler ABI info
>         -- Detecting C compiler ABI info - done
>         -- Check for working CXX compiler: /usr/bin/c++
>         -- Check for working CXX compiler: /usr/bin/c++ -- works
>         -- Detecting CXX compiler ABI info
>         -- Detecting CXX compiler ABI info - done
>         CMake Warning at CMakeLists.txt:18 (find_package):
>             Could not find module FindGit.cmake or a configuration file
>         for package
>             Git.
>
>             Adjust CMAKE_MODULE_PATH to find FindGit.cmake or set
>         Git_DIR to the
>             directory containing a CMake configuration file for Git.
>           The file will
>             have one of the following names:
>
>               GitConfig.cmake
>               git-config.cmake
>
>
>         this fix is here :
>
>         diff --git a/CMakeLists.txt b/CMakeLists.txt
>         index 0d1d3a4..7d3cf5d 100644
>         --- a/CMakeLists.txt
>         +++ b/CMakeLists.txt
>         @@ -13,6 +13,7 @@ set(VERSION "{PACKAGE_VERSION}")
>            set(SOVERSION "3.0.0")
>
>            set(LWS_LIBRARY_VERSION ${PACKAGE_VERSION})
>         +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
>         "${PROJECT_SOURCE_DIR}/cmake/"__)
>
>            # Try to find the current Git hash.
>            find_package(Git)
>         @@ -93,7 +94,6 @@ if (MINGW)
>                   set(LWS_MINGW_SUPPORT 1)
>            endif()
>
>         -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
>         "${PROJECT_SOURCE_DIR}/cmake/"__)
>            include_directories(${PROJECT___BINARY_DIR})
>
>
>     Works here OK without that, but since it also works with it: applied.
>
>     http://git.libwebsockets.org/__cgi-bin/cgit/libwebsockets/__commit/?id=__d6bf73c224ca5ee03ad7c887454c15__4facfed366
>     <http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=d6bf73c224ca5ee03ad7c887454c154facfed366>
>
>     My is cmake-2.8.10.2-4.fc19.x86_64
>
>     $ cmake ../
>     -- The C compiler identification is GNU 4.8.0
>     -- The CXX compiler identification is GNU 4.8.0
>     -- Check for working C compiler: /usr/bin/cc
>     -- Check for working C compiler: /usr/bin/cc -- works
>     -- Detecting C compiler ABI info
>     -- Detecting C compiler ABI info - done
>     -- Check for working CXX compiler: /usr/bin/c++
>     -- Check for working CXX compiler: /usr/bin/c++ -- works
>     -- Detecting CXX compiler ABI info
>     -- Detecting CXX compiler ABI info - done
>     -- Found Git: /usr/bin/git (found version "1.8.1.2")
>     Git commit hash: dc914cf
>     -- Performing Test HAVE_inline
>     -- Performing Test HAVE_inline - Success
>     -- Performing Test HAVE___inline__
>     -- Performing Test HAVE___inline__ - Success
>     -- Performing Test HAVE___inline
>     -- Performing Test HAVE___inline - Success
>     -- Looking for bzero
>     -- Looking for bzero - found
>     -- Looking for fork
>     -- Looking for fork - found
>     -- Looking for malloc
>     -- Looking for malloc - found
>     -- Looking for memset
>     -- Looking for memset - found
>     -- Looking for realloc
>     -- Looking for realloc - found
>     -- Looking for socket
>     -- Looking for socket - found
>     -- Looking for strerror
>     -- Looking for strerror - found
>     -- Looking for vfork
>     -- Looking for vfork - found
>     -- Looking for getifaddrs
>     -- Looking for getifaddrs - found
>     -- Looking for dlfcn.h
>     -- Looking for dlfcn.h - found
>     -- Looking for fcntl.h
>     -- Looking for fcntl.h - found
>     -- Looking for inttypes.h
>     -- Looking for inttypes.h - found
>     -- Looking for memory.h
>     -- Looking for memory.h - found
>     -- Looking for netinet/in.h
>     -- Looking for netinet/in.h - found
>     -- Looking for stdint.h
>     -- Looking for stdint.h - found
>     -- Looking for stdlib.h
>     -- Looking for stdlib.h - found
>     -- Looking for strings.h
>     -- Looking for strings.h - found
>     -- Looking for string.h
>     -- Looking for string.h - found
>     -- Looking for sys/prctl.h
>     -- Looking for sys/prctl.h - found
>     -- Looking for sys/socket.h
>     -- Looking for sys/socket.h - found
>     -- Looking for sys/stat.h
>     -- Looking for sys/stat.h - found
>     -- Looking for sys/types.h
>     -- Looking for sys/types.h - found
>     -- Looking for unistd.h
>     -- Looking for unistd.h - found
>     -- Looking for vfork.h
>     -- Looking for vfork.h - not found
>     -- Looking for zlib.h
>     -- Looking for zlib.h - found
>     -- Looking for 4 include files stdlib.h, ..., float.h
>     -- Looking for 4 include files stdlib.h, ..., float.h - found
>     -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
>     ZLib include dirs: /usr/include
>     ZLib libraries: /usr/lib64/libz.so
>     Compiling with SSL support
>     -- Found OpenSSL: /usr/lib64/libssl.so;/usr/__lib64/libcrypto.so
>     (found version "1.0.1c")
>     OpenSSL include dir: /usr/include
>     OpenSSL libraries: /usr/lib64/libssl.so;/usr/__lib64/libcrypto.so
>     -- Configuring done
>     -- Generating done
>     -- Build files have been written to: /projects/libwebsockets/build
>     $
>
>     Joakim, do you have any idea / advice about how to approach adding
>     "make install" same as in the autoblah?  It should definitely take
>     care about DESTDIR (env var that does the job like --prefix in
>     confgure) since this is used in packaging to get an install in a
>     fake root.
>
>     Otherwise as far as it goes it seems to work nicely, thanks a lot
>     for providing what you have so far.
>
>     -Andy
>
>




More information about the Libwebsockets mailing list