• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1project(lws-minimal-dbus-ws-proxy-testclient C)
2cmake_minimum_required(VERSION 2.8.12)
3find_package(libwebsockets CONFIG REQUIRED)
4list(APPEND CMAKE_MODULE_PATH ${LWS_CMAKE_DIR})
5include(CheckCSourceCompiles)
6include(CheckLibraryExists)
7include(LwsCheckRequirements)
8
9set(requirements 1)
10require_lws_config(LWS_ROLE_DBUS 1 requirements)
11require_lws_config(LWS_WITH_CLIENT 1 requirements)
12
13if (NOT MSVC AND NOT WIN32 AND requirements)
14	add_executable(${PROJECT_NAME} minimal-dbus-ws-proxy-testclient.c)
15
16	if (NOT LWS_PLAT_FREERTOS)
17		find_package(PkgConfig QUIET)
18		pkg_check_modules(PC_DBUS1 dbus-1 QUIET)
19		list(APPEND LWS_DBUS_INCLUDE1 ${PC_DBUS1_INCLUDE_DIRS})
20		list(APPEND LWS_DBUS_LIB "${PC_DBUS1_LIBRARIES};dl")
21	endif()
22
23	if (LWS_DBUS_INCLUDE1)
24		include_directories("${LWS_DBUS_INCLUDE1}")
25	endif()
26	message("project ${PROJECT_NAME}")
27	if (websockets_shared)
28		target_link_libraries(${PROJECT_NAME} websockets_shared ${LIBWEBSOCKETS_DEP_LIBS})
29		add_dependencies(${PROJECT_NAME} websockets_shared ${LWS_DBUS_LIB})
30	else()
31		target_link_libraries(${PROJECT_NAME} websockets ${LWS_DBUS_LIB} ${LIBWEBSOCKETS_DEP_LIBS})
32	endif()
33endif()
34