warmcat/libwebsockets — pull request #46 by JoakimSoderberg (2014-01-23 10:53:27+00:00)
Title: Cmake additions and fixes.

Main addition
-------------------
This adds support for CMake configuration files.

This is similar to what pkg-config does but for CMake. It enables the `find_package` command to more easily find libwebsockets by installing config files into the CMake system repository when doing `make install`.

It also creates these configuration files within the build-tree, so that you can compile a specific version of libwebsockets for your project, and then simply use `find_package` to search for it in a specific path, without hard coding the specific paths to libs and include files and such:

Example:

```cmake
find_package(Libwebsockets
CONFIG # Don't try find the package using the FindLibwebsocket.cmake module. Use config.
NO_CMAKE_PACKAGE_REGISTRY # Ignore system package registry.
PATHS ${PATH_TO_LIBWEBSOCKETS_BUILD_TREE}) # Specify specific path to search in.

include_directories(${LIBWEBSOCKETS_INCLUDE_DIRS})
target_link_libraries(my_program websockets)

```

Other changes
---------------------

Also fixed the Windows build. For instance SIGUSR* does not exist ad8a596, and daemonize is not possible fa861ed.

Changed it so that all CMake command line arguments are prepended with `LWS_` so that they won't collide with other variables when compiling Libwebsockets using `add_subdirectory`, 23982ee

Print the settings at the end of the CMake file for easier overview.