Skip to content

Commit

Permalink
cmake: Added option to disable libcap
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhe4 authored and lws-team committed Nov 2, 2024
1 parent 367ba7e commit 3da6939
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,11 @@ endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(LWS_WITH_NETLINK "Monitor Netlink for Routing Table changes" ON)
option(LWS_WITH_BINDTODEVICE "Use bind to interface socket option" ON)
option(LWS_WITH_LIBCAP "Enable libcap" ON)
else()
set(LWS_WITH_NETLINK 0)
set(LWS_WITH_BINDTODEVICE 0)
set(LWS_WITH_LIBCAP OFF)
endif()
option(LWS_WITH_MCUFONT_ENCODER "Build the ttf to mcufont encoder" OFF)

Expand Down Expand Up @@ -726,7 +728,11 @@ if (WIN32 OR MSVC)
endif()
endif()

CHECK_LIBRARY_EXISTS(cap cap_set_flag "" LWS_HAVE_LIBCAP)
if (LWS_WITH_LIBCAP)
CHECK_LIBRARY_EXISTS(cap cap_set_flag "" LWS_HAVE_LIBCAP)
else()
set(LWS_HAVE_LIBCAP OFF)
endif()


if (LWS_WITH_ZLIB AND NOT LWS_WITH_BUNDLED_ZLIB)
Expand Down

0 comments on commit 3da6939

Please sign in to comment.