1 ################################################################################
5 ################################################################################
7 LIBWEBSOCKETS_VERSION
= v2.1
.0
8 LIBWEBSOCKETS_SITE
= $(call github
,warmcat
,libwebsockets
,$(LIBWEBSOCKETS_VERSION
))
9 LIBWEBSOCKETS_LICENSE
= LGPLv2.1 with exceptions
10 LIBWEBSOCKETS_LICENSE_FILES
= LICENSE
11 LIBWEBSOCKETS_DEPENDENCIES
= zlib
12 LIBWEBSOCKETS_INSTALL_STAGING
= YES
13 LIBWEBSOCKETS_CONF_OPTS
= -DLWS_WITHOUT_TESTAPPS
=ON
-DLWS_IPV6
=ON
15 # If LWS_MAX_SMP=1, then there is no code related to pthreads compiled
16 # in the library. If unset, LWS_MAX_SMP defaults to 32 and a small
17 # amount of pthread mutex code is built into the library.
18 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS
),)
19 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_MAX_SMP
=1
21 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_MAX_SMP
=
24 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
25 LIBWEBSOCKETS_DEPENDENCIES
+= openssl host-openssl
26 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_SSL
=ON
28 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_SSL
=OFF
31 ifeq ($(BR2_PACKAGE_LIBEV
),y
)
32 LIBWEBSOCKETS_DEPENDENCIES
+= libev
33 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_LIBEV
=ON
35 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_LIBEV
=OFF
38 ifeq ($(BR2_PACKAGE_LIBUV
),y
)
39 LIBWEBSOCKETS_DEPENDENCIES
+= libuv
40 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_LIBUV
=ON
42 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_LIBUV
=OFF
45 ifeq ($(BR2_STATIC_LIBS
),y
)
46 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_SHARED
=OFF
49 ifeq ($(BR2_SHARED_LIBS
),y
)
50 LIBWEBSOCKETS_CONF_OPTS
+= -DLWS_WITH_STATIC
=OFF
53 $(eval
$(cmake-package
))