• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This module tries to find libWebsockets library and include files
2#
3# LIBWEBSOCKETS_INCLUDE_DIR, path where to find libwebsockets.h
4# LIBWEBSOCKETS_LIBRARY_DIR, path where to find libwebsockets.so
5# LIBWEBSOCKETS_LIBRARIES, the library to link against
6# LIBWEBSOCKETS_FOUND, If false, do not try to use libWebSockets
7#
8# This currently works probably only for Linux
9
10FIND_PATH ( LIBWEBSOCKETS_INCLUDE_DIR libwebsockets.h
11    /usr/local/include
12    /usr/include
13)
14
15FIND_LIBRARY ( LIBWEBSOCKETS_LIBRARIES websockets
16    /usr/local/lib
17    /usr/lib
18)
19
20GET_FILENAME_COMPONENT( LIBWEBSOCKETS_LIBRARY_DIR ${LIBWEBSOCKETS_LIBRARIES} PATH )
21
22SET ( LIBWEBSOCKETS_FOUND "NO" )
23IF ( LIBWEBSOCKETS_INCLUDE_DIR )
24    IF ( LIBWEBSOCKETS_LIBRARIES )
25        SET ( LIBWEBSOCKETS_FOUND "YES" )
26    ENDIF ( LIBWEBSOCKETS_LIBRARIES )
27ENDIF ( LIBWEBSOCKETS_INCLUDE_DIR )
28
29MARK_AS_ADVANCED(
30    LIBWEBSOCKETS_LIBRARY_DIR
31    LIBWEBSOCKETS_INCLUDE_DIR
32    LIBWEBSOCKETS_LIBRARIES
33)