• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# - Config file for lws
2
3# It defines the following variables
4#  LIBWEBSOCKETS_INCLUDE_DIRS - include directories for lws
5#  LIBWEBSOCKETS_LIBRARIES    - libraries to link against
6
7# Get the path of the current file.
8get_filename_component(LWS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
9list(APPEND CMAKE_MODULE_PATH ${libwebsockets_DIR})
10
11set(LIBWEBSOCKETS_INCLUDE_DIRS "@LWS__INCLUDE_DIRS@" "@LWS_PUBLIC_INCLUDES@")
12
13# Include the project Targets file, this contains definitions for IMPORTED targets.
14include(${LWS_CMAKE_DIR}/LibwebsocketsTargets.cmake)
15include(${LWS_CMAKE_DIR}/LwsCheckRequirements.cmake)
16
17# IMPORTED targets from LibwebsocketsTargets.cmake
18set(LIBWEBSOCKETS_LIBRARIES websockets websockets_shared)
19
20# These are additional include paths you will need
21foreach(item "${LIBWEBSOCKETS_INCLUDE_DIRS}")
22	include_directories(${item})
23	set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES}" ${item})
24endforeach()
25
26# These are additional libs that lws wants your app to also link to
27foreach(item "@LIB_LIST_AT_END@")
28	list(APPEND LIBWEBSOCKETS_DEP_LIBS ${item})
29endforeach()
30
31# Move boilerplate for consuming cmake files into here
32
33include(CheckIncludeFile)
34include(CheckCSourceCompiles)
35set(requirements 1)
36
37