• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1project(lws-minimal-raw-audio C)
2cmake_minimum_required(VERSION 2.8.12)
3find_package(libwebsockets CONFIG REQUIRED)
4list(APPEND CMAKE_MODULE_PATH ${LWS_CMAKE_DIR})
5include(CheckCSourceCompiles)
6include(LwsCheckRequirements)
7
8set(SAMP lws-minimal-raw-audio)
9set(SRCS audio.c)
10
11set(requirements 1)
12require_lws_config(LWS_WITH_ALSA 1 requirements)
13require_lws_config(LWS_WITH_NETWORK 1 requirements)
14
15if (requirements)
16	add_executable(${SAMP} ${SRCS})
17
18	if (websockets_shared)
19		target_link_libraries(${SAMP} websockets_shared asound ${LIBWEBSOCKETS_DEP_LIBS})
20		add_dependencies(${SAMP} websockets_shared)
21	else()
22		target_link_libraries(${SAMP} websockets asound ${LIBWEBSOCKETS_DEP_LIBS})
23	endif()
24endif()
25